This is a migrated thread and some comments may be shown as answers.

Conversion Error when binding RoutedUICommands to RadContextMenu

1 Answer 36 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
Norbert
Top achievements
Rank 1
Norbert asked on 19 Jul 2012, 02:45 PM

Hi,

I'm using data bound Commands in my application. I'm using ReadonlyCollections storing the RoutedUICommands bound to ItemsSource of the Menu. This works fine when using the standard WPF context menu. However when i try to use RadContextMenu a NotSupportedException is thrown, saying that CommandConverter cannot convert RoutedUICommand to String. Why would it want do to this conversion anyway?

Any help would be appreciated.

This is the original code using ContextMenu (MyCommandList is of type ReadOnlyCollection<RoutedUICommand>) which is working:

<telerik:RadTreeView.ContextMenu>
<ContextMenu ItemsSource="{Binding Path=MyCommandList}"/>
</telerik:RadTreeView.ContextMenu>

Here is the code with RadContextMenu that is not working:

<telerik:RadContextMenu.ContextMenu>
 <telerik:RadContextMenu ItemsSource="{Binding Path=MyCommandList}"/>
</telerik:RadContextMenu.ContextMenu>

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 20 Jul 2012, 03:47 PM
Hello Norbert,

Could you send us your sample project so that we can investigate this further?

Regards,
Hristo
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ContextMenu
Asked by
Norbert
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or