This question is locked. New answers and comments are not allowed.
Hello,
I have problem with TreeView. I have following code:
I have problem with TreeView. I have following code:
<
UserControl
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
x:Class
=
"AdministrationClient.Pages.SettingsManagerPage"
mc:Ignorable
=
"d"
xmlns:core
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:telerikNavigation
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
xmlns:local
=
"clr-namespace:AdministrationClient"
d:DesignHeight
=
"300"
d:DesignWidth
=
"400"
>
<
UserControl.Resources
>
<
core:HierarchicalDataTemplate
x:Key
=
"SettingsTreeNodeTemplate"
ItemsSource
=
"{Binding Children}"
>
<
core:HierarchicalDataTemplate.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Text}"
TextWrapping
=
"Wrap"
Width
=
"400"
/>
</
DataTemplate
>
</
core:HierarchicalDataTemplate.ItemTemplate
>
</
core:HierarchicalDataTemplate
>
</
UserControl.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"22"
/>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"500"
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Row
=
"0"
Grid.ColumnSpan
=
"2"
FlowDirection
=
"RightToLeft"
>
<
telerik:RadButton
Name
=
"btnNewSettingsItem"
Width
=
"55"
Height
=
"22"
Content
=
"New"
/>
<
TextBox
Text
=
"{Binding Path=Name}"
></
TextBox
>
</
StackPanel
>
<
telerikNavigation:RadTreeView
Grid.Row
=
"1"
Grid.Column
=
"0"
Name
=
"rtvSettingsTree"
ItemsSource
=
"{Binding SettingsTree}"
ItemTemplate
=
"{StaticResource SettingsTreeNodeTemplate}"
>
</
telerikNavigation:RadTreeView
>
</
Grid
>
</
UserControl
>
I dont know why but result of this code is TreeView which is shown in the following picture:
http://i27.tinypic.com/33f4wgp.png
Can you please tell my why expandable node doesnt show text?
My Next question is how to show more than two levels? Just now, TreeView is able to show only 2 levels but I dont know number of levels. Is it possible?
Thank you very much.