Pen.StartLineCap Propriedade

Definição

Obtém ou define o tipo de forma a ser usado no início de um traço.

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

Valor da propriedade

O tipo de forma que inicia o traço. O valor padrão é Flat.

Exemplos

O exemplo a seguir mostra como usar as StartLineCap propriedades e EndLineCap para criar uma extremidade arredondada em um lado de um traço e uma extremidade triangular do outro lado do traço.

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

Comentários

Informações da propriedade de dependência

Campo Identificador StartLineCapProperty
Propriedades de metadados definidas como true Nenhum

Aplica-se a

Confira também