FrameworkElement.MinWidth Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the minimum width constraint of the element.
public:
property double MinWidth { double get(); void set(double value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))]
[System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public double MinWidth { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))>]
[<System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)>]
member this.MinWidth : double with get, set
Public Property MinWidth As Double
The minimum width of the element, in device-independent units (1/96th inch per unit). The default value is 0.0. This value can be any value equal to or greater than 0.0. However, PositiveInfinity is not valid, nor is NaN.
- Attributes
This is one of three properties on FrameworkElement that specify width information. The other two are Width and MaxWidth. If there is a conflict between these values, the order of application for actual width determination is first MinWidth must be honored, then MaxWidth, and finally if each of these are within bounds, Width.
The value restrictions on the Double value are enforced by a ValidateValueCallback mechanism. If you attempt to set an invalid value, a run-time exception is thrown.
<object MinWidth="double"/>
-or-
<object MinWidth="qualifiedDouble"/>
double Double
String representation of a Double value equal to or greater than 0.0. This is interpreted as a device-independent unit (1/96th inch) measurement. Strings need not explicitly include decimal points. For instance a value of 1
is acceptable.
The same Double range restrictions as mentioned in the Property Value section apply.
qualifiedDouble
A double value as described above, followed by one of the following unit declaration strings: px
, in
, cm
, pt
.
px
(default) is device-independent units (1/96th inch per unit)
in
is inches; 1in==96px
cm
is centimeters; 1cm==(96/2.54) px
pt
is points; 1pt==(96/72) px
Item | Value |
---|---|
Identifier field | MinWidthProperty |
Metadata properties set to true |
AffectsMeasure |
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: