C# Question

disable maximize capacity in a wpf window

I'm trying to disable the maximize capacity (not the maximize button) in a wpf window, but so far nothing has succeded.

I'm using a window with WindowStyle="none", but when I drag the window to the far top of the screen, the OS "maximizes" the window (terribly bad, by the way).

I uploaded 3 pictures to show what is happening exactly.

(however, due to the fact that I don't have 10 reputation, I have to post the links instead. Sorry about that. And I can't put all 3 links, only 2 of them, but the first one is just of the window working normally)



Answer Source

Set MaxHeight,MinHeight and MaxWidth,MinWidth property for the window.


 <Window x:Class="test.MainWindow"        
    Title="MainWindow" MaxHeight="350" MaxWidth="525" MinHeight="350" MinWidth="525">

How do you disable Aero Snap in an application?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download