2 posts, 0 answers
  1. Jether
    Jether avatar
    1 posts
    Member since:
    Oct 2010

    Posted 17 May 2011 Link to this post

    I need to load the contents of a RadTabItem dynamically from a url. How do I do?

    RadTabItem itemToAdd = new RadTabItem()
                  Header = _Header             
              //itemToAdd.Content = Application.LoadComponent(new Uri("",UriKind.Relative),"assemlyName;component/test.xaml");
              itemToAdd.Content = new Uri("/Pages/ThatPage.xaml", UriKind.Relative);
  2. Tina Stancheva
    Tina Stancheva avatar
    3298 posts

    Posted 20 May 2011 Link to this post

    Hello Jether,

    From the code snippet you sent I take it that the URL page you want to add to the RadTabItem.Content is basically a UserControl. Is that the case?

    If it is, you don't need to use a URL to add it to the RadTabItem. You can add it like so:
    RadTabItem itemToAdd = new RadTabItem()
                  Header = _Header            
    itemToAdd.Content = new ThatPage();
    You can fine more info about how to add UserControls to your main page here. I hope this will help you.

    Kind regards,
    Tina Stancheva
    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. DevCraft banner
Back to Top