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
780
Style for Checkable menuItem with just the Check
posted

Does anyone have a Style made for a XamWebMenuItem that doesn't show the full check box, but just shows a Check mark if IsChecked, and nothing if IsChecked is false? 

Thanks,
Keith

Parents
  • 7922
    Verified Answer
    posted

    Hi dmTech04

    I've attached a full demo file for you. The most important part is replacing the checkbox presenter with this code

                                         <Border
                                             Name="HeaderCheckboxPresenter" 
                                             Width="13" Height="13"
                                             Visibility="{TemplateBinding CheckBoxVisibilityResolved}"
                                             Margin="6,0,6,0"
                                             BorderThickness="1">
                                             <Path
                                               DataContext="{TemplateBinding IsChecked}"
                                               Name="CheckMark"
                                               Width="7" Height="7"
                                               Visibility="{Binding Converter={StaticResource CheckBoxStateConverter}}"
                                               Stroke="{StaticResource GlyphBrush}"
                                               StrokeThickness="2"
                                               Data="M 0 0 L 7 7 M 0 7 L 7 0" />
                                          </Border>

    Hope this help

    Todor

     

    MainPage.zip
Reply Children
No Data