wpf 设置窗体在屏幕的初始位置

        /// <summary>
        /// 设置窗体在屏幕的位置
        /// </summary>
        public void WinPosition()
        {
            double ScreenWidth = System.Windows.SystemParameters.PrimaryScreenWidth;//WPF
            this.Top = this.ActualWidth / 5;
            this.Left = ScreenWidth - this.ActualWidth *1.3;
        }
原文地址:https://www.cnblogs.com/kearney908/p/6102191.html