Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
470
Checkbox in Contaxt Menu
posted

 Hello,

I have a context Menu in my XamDataGrid which show three menu items with IsCheckable="True", I need to make code in XAML so that when any one menu item is click then checked that menu item and un check others automatically .Below is the sample of my code.

ContextMenu Name="PagingMenu" IsEnabled="True">
                            <ContextMenu.Items>
                                <MenuItem Header="Paging Option" Focusable="False" IsEnabled="False"  />
                                <Separator />                                
                                <MenuItem Header="10" Name="a10" IsCheckable="True" IsChecked="True"  Click="a10_Click" />
                                <MenuItem Header="20" Name="b20" IsCheckable="True" Click="b20_Click" />
                                <MenuItem Header="30" Name="c30" IsCheckable="True" Click="c30_Click" />
                            </ContextMenu.Items>
                        </ContextMenu>

 

Thanks in advance,

Rehman Mansoor.