DrawingAttributes.MaxHeight Field
Definition
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.
Specifies the largest value allowed for the Height property.
public: static initonly double MaxHeight;
public static readonly double MaxHeight;
staticval mutable MaxHeight : double
Public Shared ReadOnly MaxHeight As Double
Field Value
Examples
The following example ensures the Height property of the DrawingAttributes is set to a legal value. This example assumes that there is an InkCanvas called inkCanvas1
.
if (DAHeight < DrawingAttributes.MinHeight)
{
DAHeight = DrawingAttributes.MinHeight;
}
else if (DAHeight > DrawingAttributes.MaxHeight)
{
DAHeight = DrawingAttributes.MaxHeight;
}
inkCanvas1.DefaultDrawingAttributes.Height = DAHeight;
If DAHeight < DrawingAttributes.MinHeight Then
DAHeight = DrawingAttributes.MinHeight
ElseIf DAHeight > DrawingAttributes.MaxHeight Then
DAHeight = DrawingAttributes.MaxHeight
End If
inkCanvas1.DefaultDrawingAttributes.Height = DAHeight
Remarks
Use the MaxHeight field to check whether a value is within the limits allowed for the Height property. Do this when the value comes from an unknown source, such as unconstrained user input.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor