implement brush demo in wpf application

Leave a Comment
implement brush demo in wpf application with complete source code with example. Here we will see very small example with code in wpf application.
Main window
<Window x:Class="Brushdemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Rectangle Height="200" Width="200">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black" Offset="0"/>
                    <GradientStop Color="#FFD60F0F" Offset="0.972"/>
                    <GradientStop Color="#FFCFD7DA" Offset="0.427"/>
                    <GradientStop Color="#FFCFD7DA" Offset="0.279"/>
                    <GradientStop Color="#FED2B577" Offset="0.663"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
    </Grid>
</Window>
Now let's see the brush demo output


0 comments:

Post a Comment