<Window x:Class="_12_形状画刷和变换_9LinearGradientBrush.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        Icon="public/003540AH4M72.jpg" Title="12-形状画刷和变换-9LinearGradientBrush" Height="800" Width="800">
    <StackPanel>
        <StackPanel Margin="30 10" Orientation="Horizontal">
            <Rectangle Width="150" Height="100">
                <Rectangle.Fill>
                    <LinearGradientBrush>
                        <GradientStop Color="Blue" Offset="0" />
                        <GradientStop Color="White" Offset="1" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>

            <Label VerticalAlignment="Center"> GradientStop Color="Blue" Offset="0" GradientStop Color="White" Offset="1"</Label>
        </StackPanel>

        <StackPanel Margin="30 10" Orientation="Horizontal">
            <Rectangle Width="150" Height="100">
                <Rectangle.Fill>
                    <LinearGradientBrush>
                        <GradientStop Color="Red" Offset="0" />
                        <GradientStop Color="White" Offset="0.5" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>

            <Label VerticalAlignment="Center"> GradientStop Color="Blue" Offset="0" GradientStop Color="White" Offset="0.5"</Label>
        </StackPanel>

        <StackPanel Margin="30 10" Orientation="Horizontal">
            <Rectangle Width="150" Height="100">
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="1,1" EndPoint="0,0">
                        <GradientStop Color="Gold" Offset="0" />
                        <GradientStop Color="White" Offset="1" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>

            <Label VerticalAlignment="Center">StartPoint="1,1" EndPoint="0,0"</Label>
        </StackPanel>

        <StackPanel Margin="30 10" Orientation="Horizontal">
            <Rectangle Width="150" Height="100">
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                        <GradientStop Color="Blue" Offset="0" />
                        <GradientStop Color="White" Offset="1" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>

            <Label VerticalAlignment="Center">StartPoint="0,0" EndPoint="0,1"</Label>
        </StackPanel>

        <StackPanel Margin="30 10" Orientation="Horizontal">
            <Rectangle Width="150" Height="100">
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.5" SpreadMethod="Reflect">
                        <GradientStop Color="Green" Offset="0" />
                        <GradientStop Color="White" Offset="1" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>

            <Label VerticalAlignment="Center"> GradientStop Color="Blue" Offset="0" GradientStop Color="White" Offset="0.5"</Label>
        </StackPanel>

        <StackPanel Margin="30 10" Orientation="Horizontal">
            <Rectangle Width="150" Height="100">
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                        <GradientStop Color="Yellow" Offset="0" />
                        <GradientStop Color="Red" Offset="0.25" />
                        <GradientStop Color="Blue" Offset="0.75" />
                        <GradientStop Color="LimeGreen" Offset="1" />
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>

            <Label VerticalAlignment="Center">彩虹效果</Label>
        </StackPanel>
    </StackPanel>
</Window>