2 Answers, 1 is accepted
<ControlTemplate x:Key="RadPaneTemplate" TargetType="telerikDocking:RadDocumentPane">
<!--Grid Width="600" Height="600" Background="Cyan" -->
<StackPanel Width="600" Height="600" Orientation="Vertical">
<Canvas Height="300" Width="600" MouseLeftButtonDown="canvas1_MouseLeftButtonDown"MouseLeftButtonUp="canvas1_MouseLeftButtonUp" MouseMove="canvas1_MouseMove" Margin="0,0,0,0">
<Image Margin="0,0,0,0"Source="/MyApp;component/Images/pngs/test.png"></Image>
</Canvas>
<Canvas Height="300" Width="600">
<StackPanel Height="300" Width="600" Orientation="Vertical" >
<StackPanel Height="25" Width="597" Orientation="Horizontal"Margin="4,0,0,0" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" Width="175"HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="0,3,0,0">
<dataInput:Label Content="Dgrm Type:" Height="25"Width="70"></dataInput:Label>
<ComboBox Width="100"></ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Width="220"HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="0,3,0,0">
<dataInput:Label Content="Dgrm Focus:" Height="25"Width="70"></dataInput:Label>
<ComboBox Width="138"></ComboBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Width="200"HorizontalAlignment="Left" VerticalAlignment="Stretch" Margin="0,3,0,0">
<dataInput:Label Content="Sequence:" Height="25" Width="115" ></dataInput:Label>
<ComboBox Width="85"></ComboBox>
</StackPanel>
</StackPanel>
<StackPanel Height="25" Width="370" Orientation="Horizontal"Margin="4,3,0,0" HorizontalAlignment="Left">
<dataInput:Label Content="Dgrm Title:" Height="25" Width="70"HorizontalAlignment="Left"></dataInput:Label>
<TextBox Width="295" HorizontalAlignment="Left"></TextBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Width="600" Height="240">
<StackPanel Height="235" Width="297" Orientation="Vertical">
<dataInput:Label Content="Dgrm Notes:" Height="25"Margin="4,0,0,0"></dataInput:Label>
<TextBox Height="200" Margin="4,0,0,0" AcceptsReturn="True"VerticalScrollBarVisibility="Auto"></TextBox>
</StackPanel>
<StackPanel Height="235" Width="297" Orientation="Vertical">
<dataInput:Label Content="Dgrm Description:" Height="25"Margin="4,0,0,0"></dataInput:Label>
<TextBox Height="200" Margin="4,0,0,0" AcceptsReturn="True"VerticalScrollBarVisibility="Auto"></TextBox>
</StackPanel>
</StackPanel>
</StackPanel>
</Canvas>
</StackPanel>
<!-- /Grid -->
</ControlTemplate>
<Style x:Key="RadPaneStyle" TargetType="telerikDocking:RadDocumentPane">
<Setter Property="Template" Value="{StaticResource RadPaneTemplate}"></Setter>
</Style>
private void BuildNewPane(int iPaneNum)
{
//iPaneNum is the current pane count on the RadPaneGroup
RadDocumentPane rp = new RadDocumentPane();
//rp.Name = "rpDgrm" + (iPaneNum - 1);
rp.CanUserPin = false;
rp.CanUserClose = false;
rp.CanFloat = false;
rp.IsPinned = true;
rp.Header = "Diagram" + (iPaneNum - 1);
try
{
//rp.Template = (ControlTemplate)this.Resources["RadPaneTemplate"];
rp.Style = (Style)this.Resources["RadPaneStyle"];
rp.UpdateLayout();
rpgDiagrams.Items.Add(rp);
rpgDiagrams.UpdateLayout();
}
catch
{
}
}
I answered to the other thread you posted: http://www.telerik.com/community/forums/silverlight/docking/307159-error-adding-controls-to-new-radpane.aspx.
Greetings,Miroslav Nedyalkov
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.