C# Class AdvancedLauncher.Tools.Extensions.PresentationSourceExtensions

Mostra file Open project: GoldRenard/DMOAdvancedLauncher

Public Methods

Method Description
TransformClientToDescendant ( this presentationSource, Point point, Visual descendant ) : Point

Convert a point from "client" coordinate space of a window into the coordinate space of the specified element of the same window.

TransformClientToRoot ( this presentationSource, Point pt ) : Point

Convert a point from "client" coordinate space of a window into the coordinate space of the root element of the same window.

TransformDescendantToClient ( this presentationSource, Point point, Visual descendant ) : Point

Convert a point from the coordinate space of the specified element into the "client" coordinate space of the window.

TransformRootToClient ( this presentationSource, Point pt ) : Point

Convert a point from the coordinate space of the root element into the "client" coordinate space of the same window.

Private Methods

Method Description
ApplyVisualTransform ( Visual v, Point pt, bool inverse ) : Point

Convert a point from "above" the coordinate space of a visual into the the coordinate space "below" the visual.

GetVisualTransform ( Visual v ) : System.Windows.Media.Matrix

Gets the matrix that will convert a point from "above" the coordinate space of a visual into the the coordinate space "below" the visual.

Method Details

TransformClientToDescendant() public static method

Convert a point from "client" coordinate space of a window into the coordinate space of the specified element of the same window.
public static TransformClientToDescendant ( this presentationSource, Point point, Visual descendant ) : Point
presentationSource this
point System.Windows.Point
descendant Visual
return System.Windows.Point

TransformClientToRoot() public static method

Convert a point from "client" coordinate space of a window into the coordinate space of the root element of the same window.
public static TransformClientToRoot ( this presentationSource, Point pt ) : Point
presentationSource this
pt System.Windows.Point
return System.Windows.Point

TransformDescendantToClient() public static method

Convert a point from the coordinate space of the specified element into the "client" coordinate space of the window.
public static TransformDescendantToClient ( this presentationSource, Point point, Visual descendant ) : Point
presentationSource this
point System.Windows.Point
descendant Visual
return System.Windows.Point

TransformRootToClient() public static method

Convert a point from the coordinate space of the root element into the "client" coordinate space of the same window.
public static TransformRootToClient ( this presentationSource, Point pt ) : Point
presentationSource this
pt System.Windows.Point
return System.Windows.Point