How to draw two vertical lines using DrawingBrush and plying on Viewbox and Viewport?

486 Views Asked by At

i want to set the style of toolbar, i need to change the mover gripper looks like two pars 'vertically' the default style used the DrawingBrush to render the dashed lines, and i want to draw two lines without dashing, please show me How to draw two lines vertical using DrawingBrush and plying on Viewbox and Viewport?.

here is the xaml code snippet:

 <Rectangle Margin="0,2">
     <Rectangle.Fill>
              <DrawingBrush Viewport="0,0,4,4"
                            ViewportUnits="Absolute"
                            Viewbox="0,0,8,8"
                            ViewboxUnits="Absolute"
                            TileMode="Tile">
               <DrawingBrush.Drawing>
                     <DrawingGroup>
                            <GeometryDrawing Brush="#AAA"
                                             Geometry="M 4 4 L 4 8 L 8 8 L 8 4 z" />
                     </DrawingGroup>
                </DrawingBrush.Drawing>
               </DrawingBrush>
     </Rectangle.Fill>
</Rectangle>

enter image description here

1

There are 1 best solutions below

0
Steven Rands On

How about using a Path element instead:

<Path Margin="0,2" Brush="#AAA" Data="M 4 4 L 4 8 L 8 8 L 8 4 z" />