Adding controls to expander in run time

3 posts, 0 answers
  1. Nathan
    Nathan avatar
    8 posts
    Member since:
    May 2009

    Posted 22 May 2009 Link to this post

    Is there an example of how to do this in C# at run time, or can one be provided?

    Thanks!


    ex. of what I'm doing atm

    foreach (MyClass eResult in e.Result) 
                    { 
                        RadExpander re = new RadExpander(); 
                        re.Header = new TextBlock { Text = eResult.Title, Foreground = new SolidColorBrush(Colors.White) }; 
     
                        foreach (MyOtherClass in eResult.GroupItems) 
                        { 
                            MyControl mc = new MyControl (); 
                            mc.item_name.Text = GroupItems.Name;                         
                            mc.Id = GroupItems.Id; 
                            re.Content += mc + "\n";                                                 
                        } 
                        LayoutRoot.Children.Add(re); 
                    } 

  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 25 May 2009 Link to this post

    Hello Nathan,

    Please find attached a sample project that demonstrates how to add controls to RadExpander at run time. Let me know if you have any other questions.

    Greetings,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Nathan
    Nathan avatar
    8 posts
    Member since:
    May 2009

    Posted 28 May 2009 Link to this post

    Ah, thanks.  I didn't notice in the demo you guys used the wrap panel to make the cool orientation effects.
Back to Top