How to position a window in the right lower corner of the screen regardless of the diagonals?



  • How did the launch position the window in the right corner of the working table? Window.Top and Window.Leftbut on different screens, the window appears in different fields.VerticalAlignment and HorizontalAlignment It doesn't help either. Can you tell me how to fix the problem?



  • Try the designer to indicate this:

    public MainWindow()
    {
        InitializeComponent();
        var primaryMonitorArea = SystemParameters.WorkArea;
        Left = primaryMonitorArea.Right - Width - 10;
        Top = primaryMonitorArea.Bottom - Height - 10;
    }
    

    Don't forget to set it up. Width and Height


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2