Method MaxSizeOnChanged
MaxSizeOnChanged()
Registers a handler for the control's size change event to update the suggested size according to the maximum size constraints.
public virtual ControlSet MaxSizeOnChanged()
Returns
- ControlSet
The current instance of the ControlSet to allow for method chaining.
Remarks
This method ensures that the control's suggested size is adjusted whenever its size changes, respecting the maximum width and height specified by the MaxSize property. If either dimension of MaxSize is less than or equal to zero, that dimension is considered unbounded and will not restrict the suggested size.