简体   繁体   English

右键菜单中的复选框无法正确显示wp7

[英]Checkbox inside context menu not displays correctly wp7

I have a context menu and checkbox inside it, but checkbox displays not correctly. 我有一个上下文菜单和其中的复选框,但是复选框显示不正确。

                    <toolkit:ContextMenuService.ContextMenu>
                      <toolkit:ContextMenu >
                        <toolkit:MenuItem Click="iLikeIt" Tag="{Binding ElementName=chbox}"  Header="{Binding isLikeMe, Converter={StaticResource LikeIt}}"/>
                        <toolkit:MenuItem>
                          <toolkit:MenuItem.Header>
                            <CheckBox Name="chbox" Tag="{Binding}" BorderThickness="1" Content="Рассказать друзьям" >
                            </CheckBox>
                          </toolkit:MenuItem.Header>
                        </toolkit:MenuItem>
                      </toolkit:ContextMenu>
                    </toolkit:ContextMenuService.ContextMenu>

在此处输入图片说明

As this is a UI issue and not a functional one this is very likely a styling issue with the CheckBox. 由于这是一个UI问题,而不是功能问题,因此很有可能是CheckBox的样式问题。 You will need to apply a custom style to the CheckBox in the ContextMenu so that it looks OK in the inverted colours of the ContextMenu. 您将需要对ContextMenu中的CheckBox应用自定义样式,以使其在ContextMenu的反色下看起来不错。

Make sure you make it work in both Dark and Light theme though. 但是,请确保使它在“黑暗”和“明亮”主题中均能正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM