zoukankan      html  css  js  c++  java
  • Click WhiteSpace Drag

    案例实现效果:通过鼠标左键单击窗口空白处,按住鼠标来拖动窗口。该案例实现很简单,可以应用在一些自定义窗口(如窗口不显示标题栏等情况)。

    <Window x:Class="ClickWhitespaceAndDrag.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ClickWhitespaceAndDrag" Height="300" Width="300" MouseLeftButtonDown="MyMouseLeftButtonDown"
        >
        <Grid>
            
        </Grid>
    </Window>
    void MyMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
           {
               this.DragMove();
           }
  • 相关阅读:
    Two Sum II
    Read N Characters Given Read4
    Binary Tree Upside Down
    2015半年记
    再写一帖~就《离开上海》一文再说明
    再见,上海~非主流码农在上海的9年心路历程
    Debug就是Debug,Release就是Release
    代码修改之后MSbuild编译不出最新的dll解决方法
    回顾会议议程
    搞好团队建设的致胜法宝
  • 原文地址:https://www.cnblogs.com/January/p/2433477.html
Copyright © 2011-2022 走看看