我希望把对铬按钮,我发现这个解决方案Solution.WPF背景renderin错误
但它渲染backgrond为黑色。我没有在任何地方设置黑色,它是怎样的黑色?
<WindowChrome.WindowChrome>
<WindowChrome GlassFrameThickness="0.5,28,0,0.5" NonClientFrameEdges="Right"/>
</WindowChrome.WindowChrome>
<Window.Template>
<ControlTemplate>
<ContentPresenter Content="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Window}, Path=Content}"/>
</ControlTemplate>
</Window.Template>
<Grid>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right">
<Button Content="Help" WindowChrome.IsHitTestVisibleInChrome="True" Height="28" Margin="0,0,120,0"/>
</StackPanel>
您的窗口是否有内容? – dotNET
已编辑的问题 – murmansk
尝试两个快速的事情。首先将你的StackPanel的路线设置为'Stretch'。其次,使用'GlassFrameThickness'来玩看看是否有任何效果。 – dotNET