Пример #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Window_MainSetting wm = new Window_MainSetting();

            if (wm.ShowDialog() == true)
            {
                ;
            }
        }
Пример #2
0
        private void OnClickMainSetting(object sender, RoutedEventArgs e)
        {
            Window_MainSetting wm = new Window_MainSetting();
            Point pt = this.PointToScreen(new Point(0, 0));

            wm.Left = pt.X + this.ActualWidth / 2 - wm.Width / 2;
            wm.Top  = pt.Y + this.ActualHeight / 2 - wm.Height / 2;
            if (wm.ShowDialog() == true)
            {
                ;
            }
        }