C# Class ICSharpCode.WpfDesign.Designer.ModelTools

Static helper methods for working with the designer DOM.
Mostra file Open project: icsharpcode/WpfDesigner Class Usage Examples

Public Methods

Method Description
ApplyTransform ( DesignItem designItem, Transform transform, bool relative = true ) : void
ArrangeItems ( IEnumerable items, ArrangeDirection arrangeDirection ) : void
CanDeleteComponents ( ICollection items ) : bool

Gets if the specified components can be deleted.

CanSelectComponent ( DesignItem item ) : bool
ComparePositionInModelFile ( DesignItem a, DesignItem b ) : int

Compares the positions of a and b in the model file.

CreateVisualTree ( this element ) : void
DeleteComponents ( ICollection deleteItems ) : void

Deletes the specified components from their parent containers. If the deleted components are currently selected, they are deselected before they are deleted.

GetHeight ( UIElement element ) : double
GetWidth ( UIElement element ) : double
IsInDocument ( DesignItem item ) : bool

Gets if the specified design item is in the document it belongs to.

Resize ( DesignItem item, double newWidth, double newHeight ) : void
StretchItems ( IEnumerable items, StretchDirection stretchDirection ) : void
WrapItemsNewContainer ( IEnumerable items, Type containerType, bool doInsert = true ) : Rect>.Tuple

Private Methods

Method Description
GetDefaultSize ( DesignItem createdItem ) : Size
GetItemPos ( PlacementOperation operation, DesignItem designItem ) : ItemPos

Method Details

ApplyTransform() public static method

public static ApplyTransform ( DesignItem designItem, Transform transform, bool relative = true ) : void
designItem DesignItem
transform System.Windows.Media.Transform
relative bool
return void

ArrangeItems() public static method

public static ArrangeItems ( IEnumerable items, ArrangeDirection arrangeDirection ) : void
items IEnumerable
arrangeDirection ArrangeDirection
return void

CanDeleteComponents() public static method

Gets if the specified components can be deleted.
public static CanDeleteComponents ( ICollection items ) : bool
items ICollection
return bool

CanSelectComponent() public static method

public static CanSelectComponent ( DesignItem item ) : bool
item DesignItem
return bool

ComparePositionInModelFile() public static method

Compares the positions of a and b in the model file.
public static ComparePositionInModelFile ( DesignItem a, DesignItem b ) : int
a DesignItem
b DesignItem
return int

CreateVisualTree() public static method

public static CreateVisualTree ( this element ) : void
element this
return void

DeleteComponents() public static method

Deletes the specified components from their parent containers. If the deleted components are currently selected, they are deselected before they are deleted.
public static DeleteComponents ( ICollection deleteItems ) : void
deleteItems ICollection
return void

GetHeight() public static method

public static GetHeight ( UIElement element ) : double
element UIElement
return double

GetWidth() public static method

public static GetWidth ( UIElement element ) : double
element UIElement
return double

IsInDocument() public static method

Gets if the specified design item is in the document it belongs to.
public static IsInDocument ( DesignItem item ) : bool
item DesignItem
return bool

Resize() public static method

public static Resize ( DesignItem item, double newWidth, double newHeight ) : void
item DesignItem
newWidth double
newHeight double
return void

StretchItems() public static method

public static StretchItems ( IEnumerable items, StretchDirection stretchDirection ) : void
items IEnumerable
stretchDirection StretchDirection
return void

WrapItemsNewContainer() public static method

public static WrapItemsNewContainer ( IEnumerable items, Type containerType, bool doInsert = true ) : Rect>.Tuple
items IEnumerable
containerType System.Type
doInsert bool
return Rect>.Tuple