RadialGradientBrush examples and Define GradientStop in Resource : RadialGradientBrush « Windows Presentation Foundation « C# / CSharp Tutorial






<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>
    <GradientStopCollection x:Key="myGradientStops">
      <GradientStop Offset="0.0" Color="Blue" />
      <GradientStop Offset="0.4" Color="Black" />
      <GradientStop Offset="0.5" Color="White" />
      <GradientStop Offset="0.6" Color="Black" />
      <GradientStop Offset="0.7" Color="Blue" />
    </GradientStopCollection>
    
    </Window.Resources>
    <Rectangle Width="175" Height="90" Stroke="Black">
      <Rectangle.Fill>
        <RadialGradientBrush GradientStops="{StaticResource myGradientStops}"></RadialGradientBrush>
      </Rectangle.Fill>
    </Rectangle>

</Window>
WPF Radial Gradient Brush Examples And Define Gradient Stop In Resource








24.102.RadialGradientBrush
24.102.1.RadialGradientBrush Opacity from 1 to 0RadialGradientBrush Opacity from 1 to 0
24.102.2.RadialGradientBrush examples and Define GradientStop in ResourceRadialGradientBrush examples and Define GradientStop in Resource
24.102.3.RadialGradientBrush GradientOriginRadialGradientBrush GradientOrigin
24.102.4.RadialGradientBrush Rectangle.StrokeRadialGradientBrush Rectangle.Stroke
24.102.5.Add Gradient stops to RadialGradientBrush
24.102.6.Set center for RadialGradientBrush
24.102.7.Set Gradient Origin for RadialGradientBrush
24.102.8.Set the RadiusX and RadiusY for RadialGradientBrush
24.102.9.Set the SpreadMethod for GradientSpreadMethod for GradientSpreadMethod.Repeat