Skip to content

ali50m/TestWpf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

使用DragMove移动窗口超过Windows上边缘时, 窗口会自动跳到新的显示位置.

mkdir TestWpf
cd TestWpf
dotnet new sln
dotnet new wpf -o src\TestWpf
dotnet sln add src\TestWpf\TestWpf.csproj
public partial class MainWindow
{
    public MainWindow()
    {
        InitializeComponent();

        MouseLeftButtonDown += MainWindow_MouseLeftButtonDown;
    }

    private void MainWindow_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    {
        DragMove();
    }
}

alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages