Hello,
I looked on the other threads that might solve this but I couldn't find an answer.
I have a "user control", called ctrlRadPaneGroup.xaml with the content:
<telerikDocking:RadPane x:Class="telerikDocking.ctrlRadPaneGroup" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" |
xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls" |
xmlns:primitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls" |
Width="60" Height="60"> |
<telerikDocking:RadPane.Resources> |
<DataTemplate x:Key="ApplicationDragTemplate"> |
<Image Source="{Binding IconPath}" Stretch="None" VerticalAlignment="Top" /> |
</DataTemplate> |
<Style TargetType="ListBoxItem" x:Key="draggableItemStyle"> |
<Setter Property="HorizontalAlignment" Value="Stretch" /> |
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
<Setter Property="dragDrop:RadDragAndDropManager.AllowDrag" Value="True" /> |
</Style> |
</telerikDocking:RadPane.Resources> |
<telerikDocking:RadPane.Content> |
<TextBlock>gigi</TextBlock> |
<!--<ListBox Margin="10 10 10 10" Name="listboxInPane" |
dragDrop:RadDragAndDropManager.AllowDrop="True" BorderThickness="0" |
ItemContainerStyle="{StaticResource draggableItemStyle}" |
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled"> |
<ListBox.ItemTemplate> |
<DataTemplate> |
<StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> |
<Image Source="{Binding IconPath}" Margin="0 0 3 0" |
HorizontalAlignment="Center" /> |
<TextBlock Text="{Binding Name}" HorizontalAlignment="Center" /> |
</StackPanel> |
</DataTemplate> |
</ListBox.ItemTemplate> |
<ListBox.ItemsPanel> |
<ItemsPanelTemplate> |
<primitives:RadUniformGrid Columns="3" HorizontalAlignment="Left" |
VerticalAlignment="Top" /> |
</ItemsPanelTemplate> |
</ListBox.ItemsPanel> |
</ListBox>--> |
</telerikDocking:RadPane.Content> |
</telerikDocking:RadPane> |
In the code behind I add another "user pane" but the content is null and the "gigi" string does not appear:
var newPane = new ctrlRadPaneGroup(); |
newPane.Header = "Pane " + numberOfPanes.ToString(); |
var groupPane = splitContainerLeft.Items[0] as Telerik.Windows.Controls.RadPaneGroup; |
groupPane.AddItem(newPane, Telerik.Windows.Controls.Docking.DockPosition.Top); |
The pane is added successfully in the interface, but as I said "gigi", or whatever control I wanted (a listbox in my case) does not appear.
What am I doing wrong? Thank you!