Databinding with RadPaneGroup

4 posts, 0 answers
  1. Daryl
    Daryl  avatar
    5 posts
    Member since:
    Sep 2009

    Posted 14 Sep 2009 Link to this post

    I'm trying to use databinding to add RadPanes at runtime. However, when I do the following, all that's displayed is a white blank area for the pane, with no headers or controls. However, the bottom edge of the white area can be resized (even though no splitter border is visible).

    In the sample code below, I'm not even attempting to substitute content with databinding, I'm just trying to get a static item to show up. What am I missing?

    Thanks for any help!

    Here is the xaml:
       <Grid x:Name="LayoutRoot">  
          <dock:RadDocking> 
             <dock:RadSplitContainer x:Name="SummaryContainer" Orientation="Horizontal" InitialPosition="DockedTop" Height="300" VerticalContentAlignment="Top" > 
                <dock:RadPaneGroup x:Name="SummaryGroup">  
                   <dock:RadPaneGroup.ItemTemplate> 
                      <DataTemplate> 
                         <dock:RadPane Header="Summary 1" Title="Summary 1">  
                            <TextBlock Text="Summary 1 data goes here" /> 
                         </dock:RadPane> 
                      </DataTemplate> 
                   </dock:RadPaneGroup.ItemTemplate> 
                </dock:RadPaneGroup> 
             </dock:RadSplitContainer> 
          </dock:RadDocking> 
       </Grid> 

     



    And here is the code behind:

          public DockingBugTest()  
          {  
             InitializeComponent();  
             ObservableCollection<DockTestData> dockTestData = new ObservableCollection<DockTestData>();  
             dockTestData.Add(new DockTestData() { MyTitle = "My Summary 1" });  
             SummaryGroup.DataContext = dockTestData;  
             SummaryGroup.ItemsSource = dockTestData;  
          }  
     
          public class DockTestData  
          {  
             public string MyTitle { get; set; }  
          } 

     

     


  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 16 Sep 2009 Link to this post

    Hi Daryl ,

    Unfortunately setting the ItemsSource property is not supported by the Docking control (and RadSplitContainer and RadPaneGroup controls). What I could suggest you is to add your panes to the Items collection of the RadPaneGroup.

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Daryl
    Daryl  avatar
    5 posts
    Member since:
    Sep 2009

    Posted 16 Sep 2009 Link to this post

    Ah. I'm disappointed, but I'll try that.

    Thanks for the reply, Miroslav.

    --d
  4. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 17 Sep 2009 Link to this post

    Hi Daryl ,

    I'm sorry to hear that you are disappointed. The specifics of the Docking control are different from the ones in the ItemsControl. Yes, the Docking control derives from ItemsControl (and the SplitContainer and PaneGroup also), but it acts slightly different - all the panes can be moved around, closed, etc.

    The following article might be helpful for you: http://blogs.telerik.com/miroslavnedyalkov/posts/09-08-31/using_the_raddocking_control_with_prism.aspx

    Greetings,
    Miroslav Nedyalkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top