Pen.StartLineCap プロパティ

定義

ストロークの始点に使用する形状の種類を取得または設定します。

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

プロパティ値

PenLineCap

ストロークを開始する形状の種類。 既定値は Flat です。

次の例は、プロパティをEndLineCap使用StartLineCapして、ストロークの一方の側に丸い端を作成し、ストロークの反対側に三角形の端を作成する方法を示しています。

<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>

注釈

依存プロパティ情報

識別子フィールド StartLineCapProperty
に設定されたメタデータ プロパティ true なし

適用対象

こちらもご覧ください