This is a migrated thread and some comments may be shown as answers.

Databinding with RadPaneGroup

3 Answers 177 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Daryl
Top achievements
Rank 1
Daryl asked on 14 Sep 2009, 04:02 PM
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; }  
      } 

 

 


3 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 16 Sep 2009, 02:03 PM
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.
0
Daryl
Top achievements
Rank 1
answered on 16 Sep 2009, 03:00 PM
Ah. I'm disappointed, but I'll try that.

Thanks for the reply, Miroslav.

--d
0
Miroslav Nedyalkov
Telerik team
answered on 17 Sep 2009, 04:36 PM
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.
Tags
Docking
Asked by
Daryl
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Daryl
Top achievements
Rank 1
Share this question
or