C# WPF Window Width, MaxWidth, MinWidth ignored?

You have set MinWidth to 70 and therefore size of your Window cant be less than that. BTW because of control box it's width seems to have a minimum limit of 132.

You have set MinWidth to 70 and therefore size of your Window cant be less than that. BTW because of control box it's width seems to have a minimum limit of 132. If we set WindowStyle="none" to remove the title and control box, we can make the Window even smaller.

EDIT To make the Window width to 70, while the close button, Title text still visible and no-resize use this: Since 70 is a very small width, you cant have minimize and maximize button along with close button.

I want the width to be exactly 70, but when the Window displays, it's always around 80-90 pixels instead of the 70 pixels I want – Garrett Mar 16 at 15:25 remove the control box as I suggested and then you can set width to 70 by setting Width=70 on window. – Akshay J Mar 16 at 15:29 I know if I use WindowStyle="none", it will respect the width=70. However, I cannot use WindowStyle="none" because my application requires the Windows chrome and close buttons in the title bar.

What control box are you referring to? – Garrett Mar 16 at 15:35 try setting WindowStyle="ToolWindow" Width="70" ResizeMode="NoResize". This does not remove the close button.

– Akshay J Mar 16 at 16:35.

70 that you have specified is not in pixels. WPF works on points and it actually sizes window to pixels based on Screen DPI (Dots per Inch).

I guess by pixels he is referring to DIU(Device Independent Units) :) – Akshay J Mar 16 at 16:52.

I was able to do what I wanted by adding WindowStyle="ToolWindow" and ResizeMode="NoResize". This allowed me to keep the titlebar and the close button, while allowing the window's width to be set at 70pt.

Please mark my reply as answer. – Akshay J Mar 16 at 17:05.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions