GrapeCity.Xaml.SpreadSheet.Data
Create Method (ThreeColorScaleRule)
Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace > ThreeColorScaleRule Class : Create Method
The minimum scale type.
The minimum scale value.
The minimum scale color.
The midpoint scale type.
The midpoint scale value.
The midpoint scale color.
The maximum scale type.
The maximum scale value.
The maximum scale color.
Creates a new three color scale with the specified parameters.
Syntax
'Declaration
 
Public Shared Function Create( _
   ByVal minType As ScaleValueType, _
   ByVal minValue As Object, _
   ByVal minColor As Color, _
   ByVal midType As ScaleValueType, _
   ByVal midValue As Object, _
   ByVal midColor As Color, _
   ByVal maxType As ScaleValueType, _
   ByVal maxValue As Object, _
   ByVal maxColor As Color _
) As ThreeColorScaleRule
'Usage
 
Dim minType As ScaleValueType
Dim minValue As Object
Dim minColor As Color
Dim midType As ScaleValueType
Dim midValue As Object
Dim midColor As Color
Dim maxType As ScaleValueType
Dim maxValue As Object
Dim maxColor As Color
Dim value As ThreeColorScaleRule
 
value = ThreeColorScaleRule.Create(minType, minValue, minColor, midType, midValue, midColor, maxType, maxValue, maxColor)

Parameters

minType
The minimum scale type.
minValue
The minimum scale value.
minColor
The minimum scale color.
midType
The midpoint scale type.
midValue
The midpoint scale value.
midColor
The midpoint scale color.
maxType
The maximum scale type.
maxValue
The maximum scale value.
maxColor
The maximum scale color.

Return Value

The new three color scale rule
Example
This example uses the Create method to create a rule.
var rule = GrapeCity.Xaml.SpreadSheet.Data.ThreeColorScaleRule.Create(GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 1, Windows.UI.Colors.Yellow, GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 50, Windows.UI.Colors.Blue, GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 100, Windows.UI.Colors.Red);
rule.Ranges = new GrapeCity.Xaml.SpreadSheet.Data.CellRange[] { new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 20, 1) };
gcSpreadSheet1.Sheets[0].ConditionalFormats.AddRule(rule);
Dim rule = GrapeCity.Xaml.SpreadSheet.Data.ThreeColorScaleRule.Create(GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 1, Windows.UI.Colors.Yellow, GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 50, Windows.UI.Colors.Blue, GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 100, Windows.UI.Colors.Red)
rule.Ranges = New GrapeCity.Xaml.SpreadSheet.Data.CellRange() {New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 20, 1)}
GcSpreadSheet1.Sheets(0).ConditionalFormats.AddRule(rule)
See Also

Reference

ThreeColorScaleRule Class
ThreeColorScaleRule Members