I'm creating a floating RadPane with custom style, but the width, height and content changes are not visible, only header change and I'm wondering why this code isn't working. Here is the sample
<UserControl x:Class="SilverlightApplication4.MainPage" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:radDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> |
<Grid x:Name="LayoutRoot"> |
<StackPanel> |
<Button Height="100" Width="100" Content="Click" Click="Button_Click" /> |
<radDocking:RadDocking x:Name="Docking1" > |
</radDocking:RadDocking> |
</StackPanel> |
<Grid.Resources> |
<Style x:Name="PaneStyle" TargetType="radDocking:RadPane"> |
<Setter Property="Header" Value="New Pane" /> |
<Setter Property="Width" Value="300" /> |
<Setter Property="Height" Value="300" /> |
<Setter Property="Template"> |
<Setter.Value> |
<ControlTemplate TargetType="radDocking:RadPane"> |
<ListBox> |
<ListBoxItem Content="Item1" /> |
<ListBoxItem Content="Item2" /> |
<ListBoxItem Content="Item3" /> |
</ListBox> |
</ControlTemplate> |
</Setter.Value> |
</Setter> |
</Style> |
</Grid.Resources> |
</Grid> |
</UserControl> |
namespace SilverlightApplication4 |
{ |
public partial class MainPage : UserControl |
{ |
public MainPage() |
{ |
InitializeComponent(); |
} |
private void Button_Click( object sender, RoutedEventArgs e ) |
{ |
RadPane pane = new RadPane(); |
pane.Style = (Style) LayoutRoot.Resources["PaneStyle"]; |
RadPaneGroup group = new RadPaneGroup(); |
group.Items.Add(pane); |
RadSplitContainer split = new RadSplitContainer(); |
split.InitialPosition = Telerik.Windows.Controls.Docking.DockState.FloatingDockable; |
split.Items.Add(group); |
Docking1.Items.Add(split); |
} |
} |
} |