What I do is to databind the context menu to a property that returns different menues depending on a property (itemtype) on the node in the tree.
<
telerikNavigation:RadTreeView
x:Name
=
"ItemTree"
>
<
telerikNavigation:RadTreeView.ItemTemplate
>
<
telerik:HierarchicalDataTemplate
ItemsSource
=
"{Binding Children}"
telerik:ContainerBinding.ContainerBindings
=
"{StaticResource ContainerBindings}"
>
<
Grid
HorizontalAlignment
=
"Stretch"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
telerikNavigation:RadContextMenu.ContextMenu
>
<
telerikNavigation:RadContextMenu
ItemsSource
=
"{Binding ContextMenu}"
/>
</
telerikNavigation:RadContextMenu.ContextMenu
>
<
Viewbox
Height
=
"16"
Stretch
=
"UniformToFill"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
Margin
=
"0,0,5,0"
Grid.Column
=
"0"
ToolTipService.ToolTip
=
"{Binding ToolTip, Mode=OneWay}"
>
<
ContentControl
Content
=
"{Binding NodeIcon}"
/>
</
Viewbox
>
<
TextBlock
Text
=
"{Binding ItemName, Mode=TwoWay}"
Grid.Column
=
"1"
ToolTipService.ToolTip
=
"{Binding ToolTip, Mode=OneWay}"
/>
<
Rectangle
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
Fill
=
"Transparent"
Grid.Column
=
"2"
/>
</
Grid
>
</
telerik:HierarchicalDataTemplate
>
</
telerikNavigation:RadTreeView.ItemTemplate
>
</
telerikNavigation:RadTreeView
>
The ContextMenu property of the items bound to the tree is something like this:
I have similar properties for Icon in order to display different node images depending on the item type.