Recommended

Skip Navigation LinksHome / Search

Search

 
Results Per Page

Found 1 result for UIElement coordinates.
Date between: <not defined> and <not defined>
Search in: News , Articles , Tips , Shows , Showcase , Books

Order by Publish Date   Ascending Title   Rating  

  • 2 comments  /  posted by  Denislav Savkov  on  Aug 29, 2008 (more than a year ago)

    You can get the coordinates of a System.Windows.UIElement relative to any other UIElement. Probably the most common scenario is to get the coordinates of a child element so this is our example.

    C#

    GeneralTransform generalTransform = childElement.TransformToVisual( parentElement );
    Point childToParentCoordinates = generalTransform.Transform( new Point( 0, 0 ) );

    Note! If the child is in left of the parent element or above it, the coordinates will be negative.

    That's it!




Help us make SilverlightShow even better. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)