Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight
Silverlight 3
GradientStop Class
 Offset Property
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Silverlight 3

Other versions are also available for the following:
.NET Framework Class Library for Silverlight
GradientStop..::.Offset Property

Gets the location of the gradient stop within the gradient vector.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)
Visual Basic (Declaration)
Public Property Offset As Double
    Get
    Set
Visual Basic (Usage)
Dim instance As GradientStop
Dim value As Double

value = instance.Offset

instance.Offset = value
C#
public double Offset { get; set; }
XAML Attribute Usage
<GradientStop Offset="double"/>

Property Value

Type: System..::.Double
The relative location of this gradient stop along the gradient vector. The default is 0.

Dependency property identifier field: OffsetProperty

The MappingMode of a LinearGradientBrush or RadialGradientBrush does not influence how the Offset values are interpreted. Regardless of mapping mode, the offset is always interpreted as a factor between 0 and 1 along the vector that defines the gradient. A value of 0 specifies that the stop is positioned at the beginning of the gradient vector, while a value of 1.0 specifies that the stop is positioned at the end of the gradient vector. For a LinearGradientBrush the 0 offset specifies its StartPoint. For a RadialGradientBrush the 0 offset specifies its GradientOrigin. This gradient stop offset factor is then mapped onto how each type of brush specifies its vector. A LinearGradientBrush vector follows a line that runs from its StartPoint to its EndPoint. A RadialGradientBrush vector radiates from its GradientOrigin towards the ellipse formed by Center, RadiusX, and RadiusY.

Values slightly above 1 or slightly below 0 will influence the gradient and are valid, but the same resulting gradient could probably be achieved entirely using values between 0 and 1 if all the gradient stops are adjusted relatively.

For examples and illustrations, see Brushes.

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker