Figure.Height Propriété

Définition

Obtient ou définit une valeur qui indique la hauteur d'un élément Figure.

public:
 property System::Windows::FigureLength Height { System::Windows::FigureLength get(); void set(System::Windows::FigureLength value); };
public System.Windows.FigureLength Height { get; set; }
member this.Height : System.Windows.FigureLength with get, set
Public Property Height As FigureLength

Valeur de propriété

FigureLength

Structure FigureLength spécifiant les caractéristiques de hauteur de Figure.

La valeur par défaut est FigureLength.Value = 1.0 et FigureLength.FigureUnitType = Auto.

Exemples

L’exemple suivant montre comment définir l’attribut Height d’un Figure élément.

<FlowDocument>
  <Paragraph>
    <Figure
      Name="myFigure"              
      Width="140" Height="50" 
      HorizontalAnchor="PageCenter"
      VerticalAnchor="PageCenter"
      HorizontalOffset="100" 
      VerticalOffset="20" 
      WrapDirection="Both"
      />
  </Paragraph>
</FlowDocument>

L’exemple suivant montre comment définir la Height propriété par programmation.

Figure figx = new Figure();
figx.Name = "myFigure";
figx.Width = new FigureLength(140);
figx.Height = new FigureLength(50);
figx.HorizontalAnchor = FigureHorizontalAnchor.PageCenter;
figx.VerticalAnchor = FigureVerticalAnchor.PageCenter;
figx.HorizontalOffset = 100;
figx.VerticalOffset = 20;
figx.WrapDirection = WrapDirection.Both;

Paragraph parx = new Paragraph(figx);
FlowDocument flowDoc = new FlowDocument(parx);
Dim figx As New Figure()
With figx
    .Name = "myFigure"
    .Width = New FigureLength(140)
    .Height = New FigureLength(50)
    .HorizontalAnchor = FigureHorizontalAnchor.PageCenter
    .VerticalAnchor = FigureVerticalAnchor.PageCenter
    .HorizontalOffset = 100
    .VerticalOffset = 20
    .WrapDirection = WrapDirection.Both
End With

Dim parx As New Paragraph(figx)
Dim flowDoc As New FlowDocument(parx)

Remarques

Informations sur les propriétés de dépendance

Champ d’identificateur HeightProperty
Propriétés de métadonnées définies sur true AffectsMeasure

S’applique à