天天看點

WPF去除窗體邊框及白色邊框

原文: WPF去除窗體邊框及白色邊框

<Window x:Class="WpfAppFirst.Evaluation"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfAppFirst"
        mc:Ignorable="d"
        Title="Evaluation" Height="566" Width="980" WindowStyle="None" Icon="EImg/LOGO.png" WindowChrome.WindowChrome="{DynamicResource WindowChromeKey}">
  <!--WindowStyle="None":去除窗體邊框-->
    <Window.Resources>
        <WindowChrome x:Key="WindowChromeKey">
            <WindowChrome.ResizeBorderThickness>
                <Thickness>0</Thickness>
            </WindowChrome.ResizeBorderThickness>
        </WindowChrome>
    </Window.Resources>