美文网首页
WPF 无边框 WindowChrome

WPF 无边框 WindowChrome

作者: 久百一 | 来源:发表于2020-06-15 23:54 被阅读0次

自己使用的方式

    <WindowChrome.WindowChrome>
        <WindowChrome GlassFrameThickness="1"  CaptionHeight="30"  CornerRadius="0" />
    </WindowChrome.WindowChrome>
    //WindowChrome.IsHitTestVisibleInChrome="True" 设置这样才可以让按钮有效
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,-1,-1,0" WindowChrome.IsHitTestVisibleInChrome="True">
        <Button Cursor="Hand" Name="nav_mini" Style="{StaticResource style.button.nav.mini}"  Click="button_nav_click" ></Button>
        <Button Cursor="Hand" Name="nav_max" Style="{StaticResource style.button.nav.max}"  Click="button_nav_click" ></Button>
        <Button Cursor="Hand" Name="nav_close" Style="{StaticResource style.button.nav.close}" Margin="0,-1,0,0" Click="button_nav_click" ></Button>
    </StackPanel>

别人的方式

https://www.cnblogs.com/huaxia283611/p/wpf-maximize-windowchrome.html

相关文章

网友评论

      本文标题:WPF 无边框 WindowChrome

      本文链接:https://www.haomeiwen.com/subject/ugacuhtx.html