您的位置:首页 > 其它

WPF圆角透明无边框窗体

2012-04-11 15:11 211 查看
<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();
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: