This question is locked. New answers and comments are not allowed.
Hi,
Is that possible to create the whole docking layout in the following example programmatically.
It means there should be nothing in xaml file.
http://demos.telerik.com/silverlight/#Docking/SplitContainers
Is that possible to create the whole docking layout in the following example programmatically.
It means there should be nothing in xaml file.
http://demos.telerik.com/silverlight/#Docking/SplitContainers
4 Answers, 1 is accepted
0
Accepted
Hello Li,
There shouldn't be any problems when creating RadDocking from the code behind, here are a few articles where you can find the XAML, C# and VB codes for creating splitcontainers, panegroups, etc..and setting their properties:
Hope this helps.
All the best,
Vladi
the Telerik team
There shouldn't be any problems when creating RadDocking from the code behind, here are a few articles where you can find the XAML, C# and VB codes for creating splitcontainers, panegroups, etc..and setting their properties:
- RadSplitContainer in this article.
- RadPane in this article.
- Pane Groups in this article.
Hope this helps.
All the best,
Vladi
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Li
Top achievements
Rank 1
answered on 21 Jun 2012, 09:33 AM
Hello Vladi,
Following is the xaml file and code behind file:
<Grid x:Name="LayoutRoot" Background="White">
<telerik:RadDocking Name="docking">
<telerik:RadSplitContainer x:Name="splitContainer2" InitialPosition="DockedBottom">
</telerik:RadSplitContainer>
</telerik:RadDocking>
</Grid>
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
RadPaneGroup newRadPaneGroup2 = new RadPaneGroup();
newRadPaneGroup2.TabStripPlacement = Dock.Top;
newRadPaneGroup2.Items.Add(new RadPane() { Header = "Bottom1" });
newRadPaneGroup2.Items.Add(new RadPane() { Header = "Bottom2" });
this.splitContainer2.ItemsSource = new List<RadPaneGroup> { newRadPaneGroup2 };
}
}
Problem is when i try to dock or auto hide the pane, i get NullReferenceException.
Docking Version is 2011.3.1116.1040
Best wishes
Following is the xaml file and code behind file:
<Grid x:Name="LayoutRoot" Background="White">
<telerik:RadDocking Name="docking">
<telerik:RadSplitContainer x:Name="splitContainer2" InitialPosition="DockedBottom">
</telerik:RadSplitContainer>
</telerik:RadDocking>
</Grid>
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
RadPaneGroup newRadPaneGroup2 = new RadPaneGroup();
newRadPaneGroup2.TabStripPlacement = Dock.Top;
newRadPaneGroup2.Items.Add(new RadPane() { Header = "Bottom1" });
newRadPaneGroup2.Items.Add(new RadPane() { Header = "Bottom2" });
this.splitContainer2.ItemsSource = new List<RadPaneGroup> { newRadPaneGroup2 };
}
}
Problem is when i try to dock or auto hide the pane, i get NullReferenceException.
Docking Version is 2011.3.1116.1040
Best wishes
0
Li
Top achievements
Rank 1
answered on 21 Jun 2012, 11:11 AM
Hello Vladi,
Thank you for your answer.
I should use Items.Add instead of setting ItemsSource.
Best wishes
Li
Thank you for your answer.
I should use Items.Add instead of setting ItemsSource.
Best wishes
Li
0
Hi Li,
Yes that is the correct way of adding Items to SplitContainers.
Greetings,
Vladi
the Telerik team
Yes that is the correct way of adding Items to SplitContainers.
Greetings,
Vladi
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>