Pen.StartLineCap Propriété

Définition

Obtient ou définit le type de forme à utiliser au début d'un trait.

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

Valeur de propriété

Type de forme qui démarre le trait. La valeur par défaut est Flat.

Exemples

L’exemple suivant montre comment utiliser les StartLineCap propriétés et EndLineCap pour créer une extrémité arrondie d’un côté d’un trait et une extrémité triangulaire de l’autre côté du trait.

<Page 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <StackPanel Margin="20">

    <Canvas Margin="100"  Width="100" Height="100">
      <Canvas.Background>
        <DrawingBrush>
          <DrawingBrush.Drawing>
            <GeometryDrawing>
              <GeometryDrawing.Geometry>
                <LineGeometry StartPoint="10,10" EndPoint="50,100" />
              </GeometryDrawing.Geometry>
              <GeometryDrawing.Pen>
                
                <!-- This Pen specifies a round line cap at the beginning of
                     the line and a triangular line cap at the end of the line. -->
                <Pen Brush="Blue" Thickness="8"  StartLineCap="Round" 
                     EndLineCap="Triangle" />
              </GeometryDrawing.Pen>
            </GeometryDrawing>
          </DrawingBrush.Drawing>
        </DrawingBrush>
      </Canvas.Background>
    </Canvas>

  </StackPanel>

</Page>

Remarques

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

Champ Identificateur StartLineCapProperty
Propriétés de métadonnées définies sur true Aucun

S’applique à

Voir aussi