WPF创建无标题栏的窗口和移动无标题栏窗口

 1. 设置WindowStyle如下:

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        Title="MainWindow" WindowStyle="None">

2. 添加MouseLeftButtonDown事件

private void OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)

{

    DragMove();

}

 

你可能感兴趣的:(WPF,软件开发,wpf,object,class)