C# 클래스 SilverFlow.Controls.Extensions.ControlExtensions

Useful WPF/Silverlight controls extensions
파일 보기 프로젝트 열기: Zoomicon/ZUI

공개 메소드들

메소드 설명
ContainsPoint ( this element, Point point, UIElement origin = null ) : bool

Determines whether the specified element contains the point.

GetActualBoundingRectangle ( this element ) : Rect

Gets the actual bounding rectangle of the FrameworkElement.

GetPropertyPathForTranslateTransformX ( this element ) : PropertyPath

Gets a PropertyPath for the TranslateTransform.X property.

GetPropertyPathForTranslateTransformY ( this element ) : PropertyPath

Gets a PropertyPath for the TranslateTransform.Y property.

GetRelativePosition ( this element, UIElement rootElement ) : Point

Gets position of the element relative to another specified (root) element.

GetScaleFactorToFit ( this element, double maxWidth, double maxHeight ) : double

Gets scale factor to fit the element to the specified size.

Horizontal ( this thickness ) : double

Gets total horizontal value of the specified thickness.

IsFocused ( this control ) : bool
IsVisible ( this uiElement ) : bool

Determines whether the specified UI element is visible.

IsVisualAncestorOf ( this element, DependencyObject descendent ) : bool
IsVisualDescendentOf ( this element, DependencyObject ancestor ) : bool
MoveToContainer ( this element, FrameworkElement newContainer ) : void

Moves the element to the new container. The container can be a Panel or a Decorator (Border in Silverlight) derived class.

RemoveFromContainer ( this element ) : void

Removes the element from its container. The container can be a Panel or a Decorator (Border in Silverlight) derived class.

SetVisible ( this uiElement, bool visible = true ) : void

Sets the visible of the UIElement.

Vertical ( this thickness ) : double

Gets total vertical value of the specified thickness.

비공개 메소드들

메소드 설명
GetPropertyPathForTranslateTransform ( this element, string translateBy ) : PropertyPath

Gets a PropertyPath for the TranslateTransform property.

메소드 상세

ContainsPoint() 공개 정적인 메소드

Determines whether the specified element contains the point.
public static ContainsPoint ( this element, Point point, UIElement origin = null ) : bool
element this This FrameworkElement.
point Point The point to check.
origin UIElement Relative origin (optional).
리턴 bool

GetActualBoundingRectangle() 공개 정적인 메소드

Gets the actual bounding rectangle of the FrameworkElement.
public static GetActualBoundingRectangle ( this element ) : Rect
element this The element.
리턴 System.Windows.Rect

GetPropertyPathForTranslateTransformX() 공개 정적인 메소드

Gets a PropertyPath for the TranslateTransform.X property.
public static GetPropertyPathForTranslateTransformX ( this element ) : PropertyPath
element this The element.
리턴 System.Windows.PropertyPath

GetPropertyPathForTranslateTransformY() 공개 정적인 메소드

Gets a PropertyPath for the TranslateTransform.Y property.
public static GetPropertyPathForTranslateTransformY ( this element ) : PropertyPath
element this The element.
리턴 System.Windows.PropertyPath

GetRelativePosition() 공개 정적인 메소드

Gets position of the element relative to another specified (root) element.
Input parameter is null.
public static GetRelativePosition ( this element, UIElement rootElement ) : Point
element this The element.
rootElement UIElement The root element.
리턴 Point

GetScaleFactorToFit() 공개 정적인 메소드

Gets scale factor to fit the element to the specified size.
public static GetScaleFactorToFit ( this element, double maxWidth, double maxHeight ) : double
element this The element to scale.
maxWidth double Maximal width of the element.
maxHeight double Maximal height of the element.
리턴 double

Horizontal() 공개 정적인 메소드

Gets total horizontal value of the specified thickness.
Input parameter is null.
public static Horizontal ( this thickness ) : double
thickness this The thickness.
리턴 double

IsFocused() 공개 정적인 메소드

public static IsFocused ( this control ) : bool
control this
리턴 bool

IsVisible() 공개 정적인 메소드

Determines whether the specified UI element is visible.
public static IsVisible ( this uiElement ) : bool
uiElement this The UI element.
리턴 bool

IsVisualAncestorOf() 공개 정적인 메소드

public static IsVisualAncestorOf ( this element, DependencyObject descendent ) : bool
element this
descendent System.Windows.DependencyObject
리턴 bool

IsVisualDescendentOf() 공개 정적인 메소드

public static IsVisualDescendentOf ( this element, DependencyObject ancestor ) : bool
element this
ancestor System.Windows.DependencyObject
리턴 bool

MoveToContainer() 공개 정적인 메소드

Moves the element to the new container. The container can be a Panel or a Decorator (Border in Silverlight) derived class.
New Container is null.
public static MoveToContainer ( this element, FrameworkElement newContainer ) : void
element this The element.
newContainer System.Windows.FrameworkElement The new container of the element.
리턴 void

RemoveFromContainer() 공개 정적인 메소드

Removes the element from its container. The container can be a Panel or a Decorator (Border in Silverlight) derived class.
public static RemoveFromContainer ( this element ) : void
element this The element.
리턴 void

SetVisible() 공개 정적인 메소드

Sets the visible of the UIElement.
public static SetVisible ( this uiElement, bool visible = true ) : void
uiElement this The UI element.
visible bool Set Visible if true; otherwise - Collapsed.
리턴 void

Vertical() 공개 정적인 메소드

Gets total vertical value of the specified thickness.
Input parameter is null.
public static Vertical ( this thickness ) : double
thickness this The thickness.
리턴 double