Freigeben über


Line.Y1 Eigenschaft

Definition

Ruft die Y-Koordinate des Line-Anfangspunkts ab oder legt diese fest.

public:
 property double Y1 { double get(); void set(double value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))]
public double Y1 { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))>]
member this.Y1 : double with get, set
Public Property Y1 As Double

Eigenschaftswert

Double

Die Y-Koordinate des Anfangspunkts der Linie. Der Standardwert ist 0.

Attribute

Beispiele

Das folgende Beispiel zeigt, wie Sie eine Line Eigenschaft erstellen und dann mithilfe von Code festlegen Y1 .


// Add a Line Element
myLine = gcnew Line();
myLine->Stroke = Brushes::LightSteelBlue;
myLine->X1 = 1;
myLine->X2 = 50;
myLine->Y1 = 1;
myLine->Y2 = 50;
myLine->HorizontalAlignment = HorizontalAlignment::Left;
myLine->VerticalAlignment = VerticalAlignment::Center;
myLine->StrokeThickness = 2;
myGrid->Children->Add(myLine);

// Add a Line Element
myLine = new Line();
myLine.Stroke = System.Windows.Media.Brushes.LightSteelBlue;
myLine.X1 = 1;
myLine.X2 = 50;
myLine.Y1 = 1;
myLine.Y2 = 50;
myLine.HorizontalAlignment = HorizontalAlignment.Left;
myLine.VerticalAlignment = VerticalAlignment.Center;
myLine.StrokeThickness = 2;
myGrid.Children.Add(myLine);

' Add a Line Element
Dim myLine As New Line()
myLine.Stroke = Brushes.LightSteelBlue
myLine.X1 = 1
myLine.X2 = 50
myLine.Y1 = 1
myLine.Y2 = 50
myLine.HorizontalAlignment = HorizontalAlignment.Left
myLine.VerticalAlignment = VerticalAlignment.Center
myLine.StrokeThickness = 2
myGrid.Children.Add(myLine)

Hinweise

Informationen zur Abhängigkeitseigenschaft

Bezeichnerfeld Y1Property
Metadateneigenschaften auf true festgelegt AffectsMeasure, AffectsRender

Gilt für