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="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();
            }
        }

 

posted @ 2014-06-05 23:35  Jara  阅读(421)  评论(0编辑  收藏  举报