WPF-设置窗体显示在右下角

 private void Button_Click(object sender, RoutedEventArgs e)
        {
            Win_Display_Position win = new Win_Display_Position();

            //显示在右下角
            double xpos = this.Left+this.Width-win.Width-10;
            double ypos = this.Top+this.Height - win.Height-10;     


            win.Left = xpos;
            win.Top = ypos;
            win.ShowDialog();
        }

猜你喜欢

转载自blog.csdn.net/dxm809/article/details/86137039