Gets or sets the limit on the ratio of the miter length to half this pen's Thickness.
Assembly: PresentationCore (in PresentationCore.dll)
A miter is a joint made by beveling each of two surfaces to be joined to form a corner. When two line segments meet at a sharp angle, the miter may extend beyond the thickness of the line that strokes the path.
The following example shows how to use theproperty to limit the size of a corner created by two line segments.
<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> <PathGeometry> <PathGeometry.Figures> <PathFigureCollection> <PathFigure StartPoint="100,50"> <PathFigure.Segments> <PathSegmentCollection> <LineSegment Point="200,70" /> <LineSegment Point="100,60" /> </PathSegmentCollection> </PathFigure.Segments> </PathFigure> </PathFigureCollection> </PathGeometry.Figures> </PathGeometry> </GeometryDrawing.Geometry> <GeometryDrawing.Pen> <!-- The MiterLimit is set to a value of 0 so the corner formed by where the two line segments join is cut or blunted. A larger value would allow for the corner to extend out even beyond the thickness of the line. --> <Pen Brush="Blue" Thickness="4" MiterLimit="0" /> </GeometryDrawing.Pen> </GeometryDrawing> </DrawingBrush.Drawing> </DrawingBrush> </Canvas.Background> </Canvas> </StackPanel> </Page>
The following illustration shows what this code example produces.
Available since 3.0