I am Creating Controls dynamically in Screen. If i place a button in Screen then it should highlight and show the distance between closest Button which is located near to the newly placed Button.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
VisualTreeHelperhttp://www.codeproject.com/Articles/21495/Understanding-the-Visual-Tree-and-Logical-Tree-in … here check theTraverseVisualTreemethod that you can use to go thru all elements in a visual tree.UIElementcontrol check itsActualWidth&Actualheightproperty.Then using (relativePosition.X + actualWidth) and (relativePosition.Y + actualHeight) check for each element which one yields closest distance to the current element.