locked
WPF App window borders don't work properly on a 2nd monitor RRS feed

  • Question

  • I have two WPF apps:

    App using 4.6.1 - uses the standard WPF window.
    When on the primary monitor the borders are visible on all four sides. (OK)
    When on the secondary monitor and normal window, the borders are only visible at the top and left. (NG)
    When on the secondary monitor and maximized, the borders are only visible at the top and left. (NG)

    App using 4.5 - uses the WindowStyle.SingleBorderWindow style when normal, but when it goes fullscreen it changes to WindowStyle.None;
    When on the primary monitor all four borders are visible when normal. (OK)
    When on the primary monitor none of the four borders are visible when maximized. (OK)

    When on the secondary monitor only the top and left borders are visible when normal. (NG)
    When on the secondary monitor only the top border is visible when maximized. (NG)


    I tried some of my other WPF apps, they are also missing the right and bottom border. I'm not using fancy skins or XAML resources styles in all these apps.
    I tried Margin="-1,-2,0,0" on the main window grid but it made no difference.

    I tested some other apps:

    Handbrake = ok
    Agent Ransack = same as my 4.6.1 app (is this also a WPF app?)
    File Explorer = ok
    Visual Studio = ok
    Windows Calculator = ok
    Audacity = ok

    Can anyone else replicate this behavior using WPF apps?

    Win 10 Pro v2004
    nVidia RTX 2080, tried drivers 446.14 and 451.67 = latest
    Primary = 3440x1440 Monitor
    Secondary = 1920x1080 Projector


    • Edited by K24A3 Saturday, August 15, 2020 2:50 AM
    • Moved by CoolDadTx Saturday, August 15, 2020 3:41 PM WPF related
    Saturday, August 15, 2020 2:48 AM

All replies

  • Hello,

    I've not seen this behavior, at least none of my clients (about 1,000) have never reported it over the past two years.

    I would suggest asking in the following site

    https://docs.microsoft.com/en-us/answers/topics/windows-wpf.html


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Saturday, August 15, 2020 11:04 AM