Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8334095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:14:17+00:00 2026-06-09T03:14:17+00:00

I am Creating Controls dynamically in Screen. If i place a button in Screen

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:14:18+00:00Added an answer on June 9, 2026 at 3:14 am
    1. Loop thru the visual tree of the entire view using VisualTreeHelper http://www.codeproject.com/Articles/21495/Understanding-the-Visual-Tree-and-Logical-Tree-in … here check the TraverseVisualTree method that you can use to go thru all elements in a visual tree.
    2. For each UIElement control check its ActualWidth & Actualheight property.
    3. Get the relative coordinate positions of the current UIElement. Using this code … http://blogs.msdn.com/b/llobo/archive/2006/05/02/code-for-getting-screen-relative-position-in-wpf.aspx

    Then using (relativePosition.X + actualWidth) and (relativePosition.Y + actualHeight) check for each element which one yields closest distance to the current element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating ASP.NET textbox controls dynamically. I want to know the difference between
I am creating a gridview dynamically with a ButtonField and several BoundFields. ButtonField button
First off, I am not dynamically creating any controls. This is the order I
I have a page in which controls are dynamically generated as the user navigates
i've stuck with problem. I have an ASP.NET project with dynamically creating controls. Even
I am dynamically creating a table which places a dynamically created radiobuttonlist in each
Currently I am working on an Android application that is dynamically creating controls. Everytime
In a page, on the load event, I am dynamically creating controls for display
I'm dynamically creating validation controls and adding them to an update panel. However the
I've got a web page where I am dynamically creating controls during Page_Load event

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.