【发布时间】:2011-08-16 10:41:53
【问题描述】:
我已经到处寻找这个问题的答案,并阅读了很多关于 SO 的帖子,但无济于事。
这是 VS10,.Net 4.0,标准按钮,带有图像作为背景和文本。我已经删除了非必要的属性。当鼠标进入按钮时,图像被一个灰色的大矩形替换/覆盖,中间是文本(“商店”)。
我已尝试更改大多数属性,包括。将 FocusVisualStyle 设置为 Style 和 null。
有什么想法吗?
<Button
BorderThickness="0" Content="Shop" Focusable="False"
Foreground="Black" Name="buttonShop" OverridesDefaultStyle="False"
Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
ClickMode="Release" IsEnabled="True"
IsHitTestVisible="True" isManipulationEnabled="True">
<Button.Background>
ImageBrush ImageSource="/button-green.png"
</Button.Background>
</Button>
感谢您的任何意见。
【问题讨论】: