Pen.EndLineCap Свойство
Определение
Возвращает или задает тип фигуры, используемой на конце штриха.Gets or sets the type of shape to use at the end of a stroke.
public:
property System::Windows::Media::PenLineCap EndLineCap { System::Windows::Media::PenLineCap get(); void set(System::Windows::Media::PenLineCap value); };
public System.Windows.Media.PenLineCap EndLineCap { get; set; }
member this.EndLineCap : System.Windows.Media.PenLineCap with get, set
Public Property EndLineCap As PenLineCap
Значение свойства
Тип фигуры на конце штриха.The type of shape that ends the stroke. Значение по умолчанию — Flat.The default value is Flat.
Примеры
В следующем примере показано, как использовать StartLineCap свойства и EndLineCap для создания скругленного конца на одной стороне штриха и треугольной конечной точки на другой стороне штриха.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 | EndLineCapProperty |
Свойства метаданных, для которых задано значениеtrue Metadata properties set to true |
НетNone |