0

screenshot

The red line is the desktop, and the window position has an 7px offset to the left, and a 7px offset to the top. How can I move the window right by 7px and down by 7px?

I have this in XAML to set the window's max width and height:

    MaxWidth = "{Binding Source={x:Static SystemParameters.WorkArea}, Path=Width}"
    MaxHeight = "{Binding Source={x:Static SystemParameters.WorkArea}, Path=Height}"

EDIT:

    private void BTN_Maximize_MouseUp(object sender, MouseButtonEventArgs e)
    {
        if (IsMaximized)
        {
            WindowState = WindowState.Normal;
        }
        else
        {
            WindowState = WindowState.Maximized;
        }
    }
    bool IsMaximized
    {
        get
        {
            if (WindowState == WindowState.Maximized)
                return true;
            else
                return false;
        }
    }
dymanoid
  • 14,771
  • 4
  • 36
  • 64

0 Answers0