WPF圆角透明无边框窗体

来源:互联网 发布:数据挖掘工程师面试题 编辑:程序博客网 时间:2024/05/20 06:49
<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="350" Width="525" 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();      }}

转自:http://www.cnblogs.com/baobao2010/archive/2012/04/11/2442394.html


0 0