I have a control for which I need to enforce a certain Width
or Height
, depending on a property called Orientation
, which, obviously can be Vertical
or Horizontal
.
So if the Orientation
property is Vertical
, then the Width
must always be 2.
If the Orientation
property is Horizontal
, then the Height
must always be 2.
I have tried many things including MaximumSize
, but none of them seem to work well enough.
As an example... A single-line TextBox
(With Multiline
set to False
.)?