I am having trouble setting the minimum size of my window in a C# application I am working on. I have tried this code in the form\'s constructor:
this.Minim
You should use something like this:
this.MinimumSize = new Size(100, 100);
Width
and Height
are used to get the existing values instead of setting them.
If you go to the definition of MinimumSize
, you will see this:
public override Size MinimumSize { get; set; }
Once again confirming that even when you decide to set the value for it, you have to pass an actual Size
instance. Width
and Height
are properties strictly tied to the Size
instance.