C# Class ICSharpCode.WpfDesign.Designer.Services.CreateComponentTool

A tool that creates a component.
Inheritance: ITool
Show file Open project: icsharpcode/WpfDesigner Class Usage Examples

Public Methods

Method Description
Activate ( IDesignPanel designPanel ) : void
AddItemWithCustomSizePosition ( DesignItem container, Type createdItem, Size size, Point position ) : bool
AddItemWithDefaultSize ( DesignItem container, Type createdItem, Size size ) : bool
CreateComponentTool ( Type componentType ) : System

Creates a new CreateComponentTool instance.

Deactivate ( IDesignPanel designPanel ) : void

Protected Methods

Method Description
CreateItem ( DesignContext context ) : DesignItem

Is called to create the item used by the CreateComponentTool.

Private Methods

Method Description
AddItemWithCustomSize ( DesignItem container, DesignItem createdItem, Point position, Size size ) : bool
AddItemWithDefaultSize ( DesignItem container, DesignItem createdItem, Point position ) : bool
OnMouseDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
designPanel_DragLeave ( object sender, System.Windows.DragEventArgs e ) : void
designPanel_DragOver ( object sender, System.Windows.DragEventArgs e ) : void
designPanel_Drop ( object sender, System.Windows.DragEventArgs e ) : void

Method Details

Activate() public method

public Activate ( IDesignPanel designPanel ) : void
designPanel IDesignPanel
return void

AddItemWithCustomSizePosition() public static method

public static AddItemWithCustomSizePosition ( DesignItem container, Type createdItem, Size size, Point position ) : bool
container DesignItem
createdItem System.Type
size System.Windows.Size
position Point
return bool

AddItemWithDefaultSize() public static method

public static AddItemWithDefaultSize ( DesignItem container, Type createdItem, Size size ) : bool
container DesignItem
createdItem System.Type
size System.Windows.Size
return bool

CreateComponentTool() public method

Creates a new CreateComponentTool instance.
public CreateComponentTool ( Type componentType ) : System
componentType System.Type
return System

CreateItem() protected method

Is called to create the item used by the CreateComponentTool.
protected CreateItem ( DesignContext context ) : DesignItem
context DesignContext
return DesignItem

Deactivate() public method

public Deactivate ( IDesignPanel designPanel ) : void
designPanel IDesignPanel
return void