Hi,
I have a PanelBar that is templated by a HierarchicalDataTemplate. The PanelBar also includes a ContextMenu, and when I select "Rename" in the ContextMenu I would like the selected List Item to switch to an ItemEditTemplate. However, the HierarchicalDataTemplate doesn't provide that option and putting an ItemEditTemplate in the PanelBar doesn't seem to do anything when I switch the item IsInEditMode = true. What do I have to do to switch to my EditItemListTemplate? Thank you for your help!!
Edit: I am developing in .Net 3.5 C#, using Telerik WPF 2011.03.1219.0.
I have a PanelBar that is templated by a HierarchicalDataTemplate. The PanelBar also includes a ContextMenu, and when I select "Rename" in the ContextMenu I would like the selected List Item to switch to an ItemEditTemplate. However, the HierarchicalDataTemplate doesn't provide that option and putting an ItemEditTemplate in the PanelBar doesn't seem to do anything when I switch the item IsInEditMode = true. What do I have to do to switch to my EditItemListTemplate? Thank you for your help!!
Edit: I am developing in .Net 3.5 C#, using Telerik WPF 2011.03.1219.0.
<
HierarchicalDataTemplate
x:Key
=
"ItemListTemplate"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Image
Source
=
"{Binding Path=ThumbnailFile}"
Height
=
"20"
Width
=
"20"
/>
<
TextBlock
Text
=
"{Binding Name}"
/>
</
StackPanel
>
</
HierarchicalDataTemplate
>
<
DataTemplate
x:Key
=
"EditItemListTemplate"
>
<
StackPanel
Orientation
=
"Horizontal"
Background
=
"Green"
>
<
Image
Source
=
"{Binding Path=ThumbnailFile}"
Height
=
"20"
Width
=
"20"
/>
<
TextBox
Text
=
"{Binding Name, Mode=TwoWay}"
/>
</
StackPanel
>
</
DataTemplate
>
<
HierarchicalDataTemplate
x:Key
=
"NavListTemplate"
ItemsSource
=
"{Binding ItemLists}"
ItemTemplate
=
"{StaticResource ResourceKey=ItemListTemplate}"
>
<
TextBlock
Text
=
"{Binding Name}"
/>
</
HierarchicalDataTemplate
>
...
<
telerik:RadPanelBar
ItemsSource
=
"{Binding NavSections}"
ItemTemplate
=
"{StaticResource ResourceKey=NavListTemplate}"
ExpandMode
=
"Multiple"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Top"
SelectedItem
=
"{Binding Path=SelectedItemList, Mode=TwoWay}"
Margin
=
"1"
IsEditable
=
"True"
ItemEditTemplate
=
"{StaticResource ResourceKey=EditItemListTemplate}"
>
<
telerikNavigation:RadContextMenu.ContextMenu
>
<
telerikNavigation:RadContextMenu
x:Name
=
"ContextMenu"
Opened
=
"ContextMenu_Opened"
ItemClick
=
"ContextMenu_ItemClick"
>
<
telerikNavigation:RadMenuItem
Header
=
"Rename"
/>
<
telerikNavigation:RadMenuItem
Header
=
"Delete"
/>
<
telerikNavigation:RadMenuItem
Header
=
"Select"
FontWeight
=
"Bold"
/>
</
telerikNavigation:RadContextMenu
>
</
telerikNavigation:RadContextMenu.ContextMenu
>
</
telerik:RadPanelBar
>