Hello,
I have the same problem like the original poster with a menuitem in a menuitem...The answer here from Telerik did not really helped me.
-I know how to make a flat contextmenu bound to a datasource.
-I know how to make subcontextmenus with static menuitems.
->But I don´t know how to make a subcontextmenu with databound items.
I bind a datasource on one item and I have an itemtemplate in the item for the submenuitems.
What happens is, that the subcontextmenu with the items are generated,
but I have a double focus rectangle, it seems that there is a menuitem in a menuitem (but not as a subcontextmenu)
Here is the XAML:
<
telerikNavigation:RadContextMenu.ContextMenu
>
<
telerikNavigation:RadContextMenu
x:Name
=
"gridContextMenu"
>
<
telerikNavigation:RadMenuItem
Header
=
"Element öffnen"
BdlCommands:RadMenuItemClick.Command
=
"{Binding Path=DataSource.ContactEntryActionCommand, Source={StaticResource DataContextProxy}}"
BdlCommands:RadMenuItemClick.CommandParameter
=
"OpenCurrentEntry"
/>
<
telerikNavigation:RadMenuItem
Header
=
"Element löschen"
BdlCommands:RadMenuItemClick.Command
=
"{Binding Path=DataSource.ContactEntryActionCommand, Source={StaticResource DataContextProxy}}"
BdlCommands:RadMenuItemClick.CommandParameter
=
"DeleteCurrentEntry"
/>
<
telerikNavigation:RadMenuItem
IsSeparator
=
"True"
/>
<
telerikNavigation:RadMenuItem
Header
=
"Neue Aktion"
BdlCommands:RadMenuItemClick.Command
=
"{Binding Path=DataSource.CreateNeueAktionCommand, Source={StaticResource DataContextProxy}}"
BdlCommands:RadMenuItemClick.CommandParameter
=
"CreateNeueAktion"
/>
<
telerikNavigation:RadMenuItem
Header
=
"Neue Reaktion"
BdlCommands:RadMenuItemClick.Command
=
"{Binding Path=DataSource.CreateNeueReaktionCommand, Source={StaticResource DataContextProxy}}"
BdlCommands:RadMenuItemClick.CommandParameter
=
"CreateNeueReaktion"
/>
<
telerikNavigation:RadMenuItem
Header
=
"Neuer Kontakt"
ItemsSource
=
"{Binding KontaktArten}"
>
<
telerikNavigation:RadMenuItem.ItemTemplate
>
<
DataTemplate
>
<
telerikNavigation:RadMenuItem
Header
=
"{Binding Name}"
BdlCommands:RadMenuItemClick.Command
=
"{Binding Path=DataSource.CreateNeuesKontaktCommand, Source={StaticResource DataContextProxy}}"
BdlCommands:RadMenuItemClick.CommandParameter
=
"{Binding}"
/>
</
DataTemplate
>
</
telerikNavigation:RadMenuItem.ItemTemplate
>
</
telerikNavigation:RadMenuItem
>
</
telerikNavigation:RadContextMenu
>
</
telerikNavigation:RadContextMenu.ContextMenu
>
What comes out is:
Element öffnen
Element öffnen
--------------
Neue Aktion
Neue Reaktion
Neuer Kontakt>> Neuer Report <-This sub items have a double focus rectangle
Neues Telefonat
....