Using RadialGradientBrush to fill a Rectangle : RadialGradientBrush « Windows Presentation Foundation « VB.Net Tutorial






<Window x:Class="BrushTransformExample"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Brush Transforms" Height="475" Width="510">
  <Grid>
    <Rectangle Width="120" Height="60" Margin="5" Grid.Column="1" Grid.Row="2">
      <Rectangle.Fill>
        <RadialGradientBrush>
          <GradientStop Color="Gray" Offset="0.3" />
          <GradientStop Color="Yellow" Offset="0.5" />
          <GradientStop Color="Gray" Offset="0.7" />
        </RadialGradientBrush>
      </Rectangle.Fill>
    </Rectangle>

  </Grid>
</Window>
WPF Using Radial Gradient Brush To Fill A Rectangle








16.80.RadialGradientBrush
16.80.1.RadialGradientBrush ExamplesRadialGradientBrush Examples
16.80.2.Fill with offset RadialGradientBrushFill with offset RadialGradientBrush
16.80.3.Using a RadialGradientBrushUsing a RadialGradientBrush
16.80.4.Using RadialGradientBrush to fill a RectangleUsing RadialGradientBrush to fill a Rectangle
16.80.5.RadialGradientBrush.RelativeTransformRadialGradientBrush.RelativeTransform
16.80.6.Use OpacityMask and RadialGradientBrushUse OpacityMask and RadialGradientBrush
16.80.7.RotateTransform RadialGradientBrush.TransformRotateTransform RadialGradientBrush.Transform
16.80.8.RadialGradientBrush and GradientStopRadialGradientBrush and GradientStop
16.80.9.Centered RadialGradientBrush static resourceCentered RadialGradientBrush static resource