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
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για