WinNoBorder.xaml 1.2 KB

1234567891011121314151617181920212223242526272829
  1. <Window x:Class="Test.NoBorderWin.WinNoBorder"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:Test.NoBorderWin"
  7. mc:Ignorable="d"
  8. Title="WinNoBorder" Height="450" Width="800" Background="Gold" >
  9. <Window.Resources>
  10. <!--WindowChrome.WindowChrome="{DynamicResource WindowChromeKey}"-->
  11. <!--此属性的设置和默认窗体的样板有关,客户区和非客户区-->
  12. <WindowChrome x:Key="WindowChromeKey">
  13. <WindowChrome.ResizeBorderThickness>
  14. <Thickness>5</Thickness>
  15. </WindowChrome.ResizeBorderThickness>
  16. </WindowChrome>
  17. </Window.Resources>
  18. <!--<Window.Template>
  19. <ControlTemplate TargetType="Window">
  20. <Border />
  21. </ControlTemplate>
  22. </Window.Template>-->
  23. <WindowChrome.WindowChrome>
  24. <WindowChrome />
  25. </WindowChrome.WindowChrome>
  26. <Grid>
  27. </Grid>
  28. </Window>