C# Class ICSharpCode.WpfDesign.Designer.ModelTools

Static helper methods for working with the designer DOM.
Afficher le fichier Open project: icsharpcode/WpfDesigner Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
GetDefaultSize ( DesignItem createdItem ) : Size
GetItemPos ( PlacementOperation operation, DesignItem designItem ) : ItemPos

Method Details

ApplyTransform() public static méthode

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

ArrangeItems() public static méthode

public static ArrangeItems ( IEnumerable items, ArrangeDirection arrangeDirection ) : void
items IEnumerable
arrangeDirection ArrangeDirection
Résultat void

CanDeleteComponents() public static méthode

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

CanSelectComponent() public static méthode

public static CanSelectComponent ( DesignItem item ) : bool
item DesignItem
Résultat bool

ComparePositionInModelFile() public static méthode

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

CreateVisualTree() public static méthode

public static CreateVisualTree ( this element ) : void
element this
Résultat void

DeleteComponents() public static méthode

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
Résultat void

GetHeight() public static méthode

public static GetHeight ( UIElement element ) : double
element UIElement
Résultat double

GetWidth() public static méthode

public static GetWidth ( UIElement element ) : double
element UIElement
Résultat double

IsInDocument() public static méthode

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

Resize() public static méthode

public static Resize ( DesignItem item, double newWidth, double newHeight ) : void
item DesignItem
newWidth double
newHeight double
Résultat void

StretchItems() public static méthode

public static StretchItems ( IEnumerable items, StretchDirection stretchDirection ) : void
items IEnumerable
stretchDirection StretchDirection
Résultat void

WrapItemsNewContainer() public static méthode

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