want to add usercontrol in raddocumetpane

3 posts, 0 answers
  1. karamjeet
    karamjeet avatar
    8 posts
    Member since:
    May 2011

    Posted 16 May 2011 Link to this post

    i want to add usercontrol in raddocumentpane dynamically through code at runtime is this possible

    <telerik:RadPaneGroup Name="radPaneGroup">
    <telerik:RadDocumentPane x:Name="df" Header="ddf">
                                <add User Control>
    how to add this from code behind however i put post this question on http://forums.silverlight.net/forums/t/228962.aspx they send me to this site In between i tried it by own and come with my findings i added silverlight templated control to my project add some design in that and call it on my MainPage.xaml
    radPaneGroup.Items.Add(new testing { Header= "dfhdfjh"});
    testing is the templated control class which is inheriting from RadDocumentPane radPaneGroup is RadPaneGroup in which i am adding RadDocumentPane The problem is that when i run the code it add the testing class in the header of RadDocumentPane This is Generic.xaml in which i am specifying the controls
    <Style TargetType="local:testing">
            <Setter Property="Template">
                    <ControlTemplate TargetType="local:testing">
                        <StackPanel x:Name="RottElement">
                            <TextBox x:Name="sjhd" IsReadOnly="True"></TextBox>
                            <TextBox x:Name="hello"></TextBox>
                            <Button Content="testring"></Button>
    hope, you understand what is going on and come up with your findings
  2. karamjeet
    karamjeet avatar
    8 posts
    Member since:
    May 2011

    Posted 16 May 2011 Link to this post

    Any Help,
    I want this urgently.
  3. Konstantina
    Konstantina avatar
    2332 posts

    Posted 18 May 2011 Link to this post

    Hi Karamjeet,

    Where do you want to add the UserControl? In the DocumentPane or in its Header? If you want to add it in the DocumentPane, all you need to do is to assign x:Name to the Pane and then set its Content property to the UserControl you have declared. For more information you can refer to this help article.

    Hope this information helps.

    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