Fill Polygon with Left aligned Uniform ImageBrush : ImageBrush « Windows Presentation Foundation « VB.Net Tutorial






<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPF" Height="300" Width="300">
    <Canvas Margin="5">
        <Polygon Canvas.Top="110" Canvas.Left="45" 
                 Points="40,0 150,100 10,100"
                 Stroke="Black" StrokeThickness="1">
            <Polygon.Fill>
                <ImageBrush ImageSource="c:\image.jpg" Stretch="Uniform"
                            AlignmentX="Left" />
            </Polygon.Fill>
        </Polygon>
    </Canvas>
</Window>
WPF Fill Polygon With Left Aligned Uniform Image Brush








16.79.ImageBrush
16.79.1.ImageBrush ExamplesImageBrush Examples
16.79.2.ImageBrush TileMode='Tile'ImageBrush TileMode='Tile'
16.79.3.ImageBrush TileMode='FlipX'ImageBrush TileMode='FlipX'
16.79.4.ImageBrush TileMode='FlipY'ImageBrush TileMode='FlipY'
16.79.5.ImageBrush TileMode='FlipXY'ImageBrush TileMode='FlipXY'
16.79.6.The ImageBrush's content is vertically aligned with the top of the output area.The ImageBrush's content is vertically aligned with the top of the output area.
16.79.7.The ImageBrush's content is vertically centeredThe ImageBrush's content is vertically centered
16.79.8.The ImageBrush's content is vertically aligned with the bottom of the output areaThe ImageBrush's content is vertically aligned with the bottom of the output area
16.79.9.The ImageBrush's content is right-alignedThe ImageBrush's content is right-aligned
16.79.10.The ImageBrush's content is left-alignedThe ImageBrush's content is left-aligned
16.79.11.The ImageBrush's content is centered horizontallyThe ImageBrush's content is centered horizontally
16.79.12.With the Opacity MaskWith the Opacity Mask
16.79.13.Use an ImageBrush to paint an area with an imageUse an ImageBrush to paint an area with an image
16.79.14.None Stretch ImageBrushNone Stretch ImageBrush
16.79.15.Uniform Stretch ImageBrushUniform Stretch ImageBrush
16.79.16.The ImageBrush's content is not tiled in this exampleThe ImageBrush's content is not tiled in this example
16.79.17.The ImageBrush's content is tiled in this exampleThe ImageBrush's content is tiled in this example
16.79.18.The ImageBrush's content is flipped horizontally as it is tiledThe ImageBrush's content is flipped horizontally as it is tiled
16.79.19.ImageBrush's content is not tiledImageBrush's content is not tiled
16.79.20.ImageBrush's tiles are set to 10% by 10% of the output areaImageBrush's tiles are set to 10% by 10% of the output area
16.79.21.ImageBrush's tiles are set to 10% by 30% of the output areaImageBrush's tiles are set to 10% by 30% of the output area
16.79.22.ImageBrush's tiles are set to 50% by 50% of the output areaImageBrush's tiles are set to 50% by 50% of the output area
16.79.23.ImageBrush's tiles are set to 25 by 25 pixelsImageBrush's tiles are set to 25 by 25 pixels
16.79.24.ImageBrush's tiles are set to 25 by 50 pixelsImageBrush's tiles are set to 25 by 50 pixels
16.79.25.ImageBrush ViewportUnits=AbsoluteImageBrush ViewportUnits=Absolute
16.79.26.The ImageBrush has its Stretch property set to Uniform: the image is expanded as large as possibleThe ImageBrush has its Stretch property set to Uniform: the image is expanded as large as possible
16.79.27.ImageBrush has its Stretch property set to UniformToFill: image is expanded to completely fill the rectangle, but its aspect ratio is preservedImageBrush has its Stretch property set to UniformToFill: image is expanded to completely fill the rectangle, but its aspect ratio is preserved
16.79.28.ImageBrush has its Stretch property set to Fill: image is expanded to completely fill the rectangle.ImageBrush has its Stretch property set to Fill: image is expanded to completely fill the rectangle.
16.79.29.Text's Foreground = ImageBrush. The resulting text is filled with an imageText's Foreground = ImageBrush. The resulting text is filled with an image
16.79.30.Panel's Background property with an ImageBrushPanel's Background property with an ImageBrush
16.79.31.The ImageBrush's content is flipped vertically as it is tiledThe ImageBrush's content is flipped vertically as it is tiled
16.79.32.The ImageBrush's content is flipped horizontally and vertically as it is tiledThe ImageBrush's content is flipped horizontally and vertically as it is tiled
16.79.33.Fill rectangle with UniformToFill ImageBrushFill rectangle with UniformToFill ImageBrush
16.79.34.Fill Polygon with Left aligned Uniform ImageBrushFill Polygon with Left aligned Uniform ImageBrush
16.79.35.RotateTransform ImageBrush.RelativeTransformRotateTransform ImageBrush.RelativeTransform
16.79.36.RotateTransform ImageBrush.TransformRotateTransform ImageBrush.Transform
16.79.37.Specifying a Stretch and a TileModeSpecifying a Stretch and a TileMode
16.79.38.Specifying a Stretch and alignmentSpecifying a Stretch and alignment