Hello,
I'm using RadMenu in an MVVM Caliburn Micro application,I've also a RadDocking that contains my views ... some views are sistem views and they should be enabled/disabled by a menu called Views...I've got difficulties since if I just use the menu (check/unchek) for showing/hiding it work fine, but if I start closing from the "X" I got the IsChecked desinked with the real view state.... since I use this this piece of code for the RadMenu, where do I specify the SubmenuOpened event? If I'm able to access it I can calculate the state of the views...
Thanks
I'm using RadMenu in an MVVM Caliburn Micro application,I've also a RadDocking that contains my views ... some views are sistem views and they should be enabled/disabled by a menu called Views...I've got difficulties since if I just use the menu (check/unchek) for showing/hiding it work fine, but if I start closing from the "X" I got the IsChecked desinked with the real view state.... since I use this this piece of code for the RadMenu, where do I specify the SubmenuOpened event? If I'm able to access it I can calculate the state of the views...
<
UserControl.Resources
>
<
BooleanToVisibilityConverter
x:Key
=
"booleanConverter"
/>
<
selectors:MenuItemTemplateSelector
x:Key
=
"templateSelector"
></
selectors:MenuItemTemplateSelector
>
<
HierarchicalDataTemplate
x:Key
=
"MenuItemTemplate"
ItemsSource
=
"{Binding Items}"
>
<
TextBlock
Text
=
"{Binding Text}"
cal:Action.TargetWithoutContext
=
"{Binding}"
Visibility
=
"{Binding IsVisible,Mode=TwoWay,Converter={StaticResource booleanConverter}}"
/>
</
HierarchicalDataTemplate
>
</
UserControl.Resources
>
<
Grid
>
<
telerik:RadMenu
x:Name
=
"MenuList"
ClickToOpen
=
"False"
BorderBrush
=
"Transparent"
ItemsSource
=
"{Binding Items}"
ItemTemplate
=
"{StaticResource MenuItemTemplate}"
cal:Message.Attach
=
"[Event ItemClick] = [Action OpenView($eventArgs)]"
>
<
telerik:RadMenu.ItemContainerStyle
>
<
Style
TargetType
=
"telerik:RadMenuItem"
>
<
Setter
Property
=
"IsSeparator"
Value
=
"{Binding IsSeparator}"
/>
<
Setter
Property
=
"IsChecked"
Value
=
"{Binding IsChecked, Mode=TwoWay}"
/>
<
Setter
Property
=
"IsCheckable"
Value
=
"{Binding IsCheckable}"
/>
<
Setter
Property
=
"StaysOpenOnClick"
Value
=
"{Binding IsCheckable}"
/>
</
Style
>
</
telerik:RadMenu.ItemContainerStyle
>
</
telerik:RadMenu
>
</
Grid
>
</
UserControl
>
Thanks