Hi
I am trying to implement a RadContextMenu and am not seeming to be able to get the DisplayMemberPath to work
The following code does not display the correct label on the menuitem ( the menu items do display)
But this code does
I don't want to use the second code I would like to use DisplayMemberPath. I also tried setting ToString() on the buisness object as stated in the documenation (http://www.telerik.com/help/wpf/radcontextmenu-populating-with-data-data-binding-support-overview.html ) But this did not work either.
Does anyone have any idea why this isn't working?
thanks
Murray
I am trying to implement a RadContextMenu and am not seeming to be able to get the DisplayMemberPath to work
The following code does not display the correct label on the menuitem ( the menu items do display)
<
telerik:RadButton
cal:Message.Attach
=
"Show"
BorderBrush
=
"{x:Null}"
Background
=
"{x:Null}"
Foreground
=
"Black"
FontFamily
=
"Arial"
Margin
=
"1,3"
>
<
Grid
>
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
ItemsSource
=
"{Binding Items}"
Placement
=
"Right"
DisplayMemberPath
=
"DisplayName"
/ >
</
telerik:RadContextMenu.ContextMenu
>
<
TextBlock
VerticalAlignment
=
"Top"
Foreground
=
"Red"
HorizontalAlignment
=
"Right"
Margin
=
"2"
Text
=
"{Binding Status}"
/>
<
StackPanel
>
<
Image
Source
=
"{Binding Icon}"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
/>
<
TextBlock
Text
=
"{Binding IconName}"
Foreground
=
"White"
HorizontalAlignment
=
"Center"
/>
</
StackPanel
>
</
Grid
>
</
telerik:RadButton
>
But this code does
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
ItemsSource
=
"{Binding Items}"
Placement
=
"Right"
DisplayMemberPath
=
"DisplayName"
>
<
telerik:RadContextMenu.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding DisplayName}"
/>
</
DataTemplate
>
</
telerik:RadContextMenu.ItemTemplate
>
</
telerik:RadContextMenu
>
</
telerik:RadContextMenu.ContextMenu
>
I don't want to use the second code I would like to use DisplayMemberPath. I also tried setting ToString() on the buisness object as stated in the documenation (http://www.telerik.com/help/wpf/radcontextmenu-populating-with-data-data-binding-support-overview.html ) But this did not work either.
Does anyone have any idea why this isn't working?
thanks
Murray