Paints a rectangle with a checkered pattern 2 : Stroke « Windows Presentation Foundation « VB.Net






Paints a rectangle with a checkered pattern 2

     

<Window x:Class="Workspace.DockExample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Workspace" Width="640" Height="480">

      <Rectangle Width="150" Height="150">
        <Rectangle.Fill>
          <VisualBrush TileMode="Tile">
            <VisualBrush.Visual>
              <StackPanel>
                <StackPanel.Background>
                  <DrawingBrush>
                    <DrawingBrush.Drawing>
                      <GeometryDrawing>
                        <GeometryDrawing.Brush>
                          <RadialGradientBrush>
                            <GradientStop Color="MediumBlue" Offset="0.0" />
                            <GradientStop Color="White" Offset="1.0" />
                          </RadialGradientBrush>
                        </GeometryDrawing.Brush>
                        <GeometryDrawing.Geometry>
                          <GeometryGroup>
                            <RectangleGeometry Rect="0,0,0.5,0.5" />
                            <RectangleGeometry Rect="0.5,0.5,0.5,0.5" />
                          </GeometryGroup>
                        </GeometryDrawing.Geometry>
                      </GeometryDrawing>
                    </DrawingBrush.Drawing>
                  </DrawingBrush>
                </StackPanel.Background>
                <TextBlock FontSize="10pt" Margin="10">Hello, World!</TextBlock>
              </StackPanel>
            </VisualBrush.Visual>
          </VisualBrush>
        </Rectangle.Fill>
      </Rectangle>


</Window>

   
    
    
    
    
  








Related examples in the same category

1.Dash Pattern "1 2"Dash Pattern
2.Dash Pattern "2 1"Dash Pattern
3.Dash Pattern "5 0.2 3 0.2"Dash Pattern
4.Uneven Dash Pattern "2 0.5 2"Uneven Dash Pattern
5.Dash Pattern with Rounded CapsDash Pattern with Rounded Caps
6.Bevel Line JoinBevel Line Join
7.Round Line JoinRound Line Join
8.Miter Line JoinMiter Line Join
9.Miter Line Join With Limit of 3Miter Line Join With Limit of 3
10.Flat Line CapFlat Line Cap
11.Square Line CapSquare Line Cap
12.Round Line CapRound Line Cap
13.Triangle Line CapTriangle Line Cap
14.StrokeLineJoin=BevelStrokeLineJoin=Bevel
15.StrokeLineJoin=RoundStrokeLineJoin=Round
16.StrokeStartLineCap=FlatStrokeStartLineCap=Flat
17.StrokeEndLineCap=SquareStrokeEndLineCap=Square
18.StrokeStartLineCap=SquareStrokeStartLineCap=Square
19.StrokeStartLineCap=RoundStrokeStartLineCap=Round
20.StrokeStartLineCap=TriangleStrokeStartLineCap=Triangle
21.Solid color stroke LineSolid color stroke Line
22.Stroke with semi-transparent colorStroke with semi-transparent color