Identify elements in a canvas

3 posts, 1 answers
  1. xola139
    xola139 avatar
    9 posts
    Member since:
    Jan 2010

    Posted 12 Feb 2010 Link to this post

    I'm using dragandrop with multiple elements that pull a ListBoxItem a canvas and I wonder if there is a way of identifying the elements I have in the canvas, I understand that the location coordinates I can do with e . Options.CurrentDragPoint.X.ToString () ,but I can not identify each one of these with a name or identifier

    Help me please
  2. Answer
    Kiril Stanoev
    Kiril Stanoev avatar
    1512 posts

    Posted 15 Feb 2010 Link to this post

    Hello Xola,

    I am not sure that I fully understand what your concern is. When you add the item in the Canvas, you can set the item's Name property and then, if you want to retrieve it, you can use the Canvas' FindName method.

    TextBlock textBlock = new TextBlock() { Text = "Unmodified" };
    textBlock.Name = "textBlock1";
    TextBlock retrievedTextBlock = canvas1.FindName("textBlock1") as TextBlock;
    retrievedTextBlock.Text = "Modified";

    If this does not answer your question, could you please elaborate a little bit more on what are you trying to achieve and what the actual proble with RadDragAndDropManager is. I'd be glad to further assist you.

    Sincerely yours,
    Kiril Stanoev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. xola139
    xola139 avatar
    9 posts
    Member since:
    Jan 2010

    Posted 18 Feb 2010 Link to this post

    Admin excellent thank you very much for your attention, just what I needed, this also helps me, and also found an example in the forum which helped me know the location of my items from the canvas
Back to Top