How do I get the childern of a ContentPresenter?

2 posts, 0 answers
  1. Sreedevi
    Sreedevi avatar
    4 posts
    Member since:
    Sep 2011

    Posted 10 Dec 2011 Link to this post

    Hi Team,

    Using the code I can get a content presenter. I would like to change the text(textbox/checkbox)of all controls accordingly.Here all these controls are adding dynamically so i am not able to locate into DOM Explorer.

    Please find attached document for hieraxhy in DOM your reference.

    Appreciate your help, It’s really a show stopper for us to go ahead, Please help us to overcome this issue.

    Thanks in advance


  2. Cody
    Cody avatar
    3354 posts

    Posted 11 Dec 2011 Link to this post

    Hi Sreedevi,

    If I understand the problem correctly, the best way is going to be using some code similar to this:

    IList<TextBox> textBoxes = Pages.HomeSilverlightSDK.SilverlightApp.SampleContentPresenter.Find.AllByType<TextBox>();
    textBoxes[0].User.TypeText("Text ABC", 50);
    textBoxes[1].User.TypeText("Text DEF", 50);
    textBoxes[2].User.TypeText("Text GHI", 50);
    textBoxes[3].User.TypeText("Text JKL", 50);

    All the best,
    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
Back to Top