WPF圆角透明无边框窗体

<Window x:Class="ImportData.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="" Width="" Background="{x:Null}" WindowStyle="None" MouseDown="Window_MouseDown" AllowsTransparency="True">
<Grid>
<Border CornerRadius="8,8,8,8" Background="Black" Height="Auto"></Border>
</Grid>
</Window>

窗体移动须加上

private void Window_MouseDown(object sender, MouseButtonEventArgs e)
{
if(e.LeftButton==MouseButtonState.Pressed)
{
DragMove();
}
}
上一篇:MFC如何生成一个可串行化的类


下一篇:c++类模板分文件编写存在的问题