Tiled DrawingBrush examples : DrawingBrush « Windows Presentation Foundation « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Design Patterns
8.Development Class
9.Event
10.File Stream
11.Generics
12.GUI Windows Form
13.Language Basics
14.LINQ
15.Network
16.Office
17.Reflection
18.Regular Expressions
19.Security
20.Services Event
21.Thread
22.Web Services
23.Windows
24.Windows Presentation Foundation
25.XML
26.XML LINQ
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source
C# / C Sharp » Windows Presentation Foundation » DrawingBrushScreenshots 
Tiled DrawingBrush examples
Tiled DrawingBrush examples
 

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

    <Window.Resources>
    <DrawingGroup x:Key="myDrawing" >
      <GeometryDrawing>
        <GeometryDrawing.Geometry>
          <GeometryGroup>
            <LineGeometry StartPoint="0,0" EndPoint="1,1" />
            <LineGeometry StartPoint="0,1" EndPoint="1,0" />
          </GeometryGroup>
        </GeometryDrawing.Geometry>
        <GeometryDrawing.Pen>
          <Pen Thickness="0.2" Brush="#3366FF" />
        </GeometryDrawing.Pen>
      </GeometryDrawing>
      <GeometryDrawing Brush="Red"
       Geometry="M 0.4,0.4 L 0.5,0.2 0.6,0.4 0.5,0.5" />
    </DrawingGroup>
    </Window.Resources>
    <Rectangle Width="175" Height="90" Stroke="Black">
      <Rectangle.Fill>
        <DrawingBrush Drawing="{StaticResource myDrawing}" Viewport="0,0,0.5,0.5" TileMode="Tile"></DrawingBrush>
      </Rectangle.Fill>
    </Rectangle>

</Window>

   
  
Related examples in the same category
1.Using a DrawingBrush as an Opacity MaskUsing a DrawingBrush as an Opacity Mask
2.DrawingBrush and DrawingGroupDrawingBrush and DrawingGroup
3.DrawingBrush.Transform SkewTransformDrawingBrush.Transform SkewTransform
4.DrawingBrush.RelativeTransform RotateTransformDrawingBrush.RelativeTransform RotateTransform
5.Opacity Mask from DrawingOpacity Mask from Drawing
6.A DrawingBrush paints an area with a drawingA DrawingBrush paints an area with a drawing
7.Patterns defined by the DrawingBrush expand to fill the area of the rectanglePatterns defined by the DrawingBrush expand to fill the area of the rectangle
8.Non-tiled Drawingrush examplesNon-tiled Drawingrush examples
9.An ImageDrawing enables a DrawingBrush to contain imagesAn ImageDrawing enables a DrawingBrush to contain images
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.