Pen.StartLineCap Pen.StartLineCap Pen.StartLineCap Pen.StartLineCap Property

定義

ストロークの始点に使用する形状の種類を取得または設定します。Gets or sets the type of shape to use at the beginning of a stroke.

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

プロパティ値

ストロークを開始する形状の種類。The type of shape that starts the stroke. 既定値は Flat です。The default value is Flat.

次の例では、プロパティStartLineCapEndLineCapプロパティを使用して、ストロークの片側に丸い終点を作成し、もう一方の辺に三角形の端を作成する方法を示します。The following example shows how to use the StartLineCap and EndLineCap properties to create a rounded end on one side of a stroke and a triangular end on the other side of the stroke.

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

注釈

依存プロパティ情報Dependency Property Information

識別子フィールドIdentifier field StartLineCapProperty
メタデータプロパティがに設定されるtrueMetadata properties set to true NoneNone

適用対象

こちらもご覧ください