RadialGradientBrush


RadialGradientBrushHierarchy: DependencyObject Freezable Animatable Brush GradientBrush

 <RadialGradientBrush     RadiusX="20"     RadiusY="20"     Center="0,0"     GradientOrigin="0,0" >     RadialGradientBrush.GradientStops>         <GradientStop Color="Red" Offset="5" />         <GradientStop Color="Orange" Offset="10" />    </RadialGradientBrush.GradientStops> </RadialGradientBrush> 

or:

 <RadialGradientBrush     RadiusX="20"     RadiusY="20" >     <RadialGradientBrush.Center>         <Point X="0" Y="0" />     </RadialGradientBrush.Center>     <RadialGradientBrush.GradientOrigin>         <Point X="0" Y="0" />     </RadialGradientBrush.GradientOrigin>     RadialGradientBrush.GradientStops>         <GradientStop Color="Red" Offset="5" />         <GradientStop Color="Orange" Offset="10" />    </RadialGradientBrush.GradientStops> </RadialGradientBrush> 

<RadialGradientBrush .../> paints an area with a radial gradient. The focal point is the beginning of the gradient, and a circle defines the outer boundary. RadialGradientBrush can be declared using abbreviated markup syntax as an attribute of an element:

 <element attribute="RadialGradientBrush InnerColor OuterColor" /> 

Figure 7-9 shows the result of evaluating Example 7-6, which uses a RadialGradientBrush.

Figure 7-9. A RadialGradientBrush filling an Ellipse


Attributes


Center (optional)

A Point describing the location of the center of the radial gradient. The default is (0.5,0.5). Center may be described using abbreviated markup syntax or explicitly declared as a Point.


GradientOrigin (optional)

A Point describing the focal point of the gradient. The default is (0.5,0.5). GradientOrigin may be described using abbreviated markup syntax or explicitly declared as a Point. This value is between 0 and 1.0, inclusive.


RadialGradientStops (optional)

A collection of GradientStop elements specifying the location and color of each change in the gradient. This value is between 0 and 1.0, inclusive.


RadiusX (optional)

A Double value describing the horizontal outermost radius of the gradient. The default value is 0.5. This value is between 0 and 1.0, inclusive.


RadiusY (optional)

A Double value describing the vertical outermost radius of the gradient. The default value is 0.5. This value is between 0 and 1.0, inclusive.




XAML in a Nutshell
XAML in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596526733
EAN: 2147483647
Year: 2007
Pages: 217

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net