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


GrapeCity.Xaml.SpreadSheet.Data Namespace > TwoColorScaleRule Class : Create Method
The minimum scale type.
The minimum scale value.
The minimum scale color.
The maximum scale type.
The maximum scale value.
The maximum scale color.
Creates a new two 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 maxType As ScaleValueType, _
   ByVal maxValue As Object, _
   ByVal maxColor As Color _
) As TwoColorScaleRule
'Usage
 
Dim minType As ScaleValueType
Dim minValue As Object
Dim minColor As Color
Dim maxType As ScaleValueType
Dim maxValue As Object
Dim maxColor As Color
Dim value As TwoColorScaleRule
 
value = TwoColorScaleRule.Create(minType, minValue, minColor, maxType, maxValue, maxColor)
public static TwoColorScaleRule Create( 
   ScaleValueType minType,
   object minValue,
   Color minColor,
   ScaleValueType maxType,
   object maxValue,
   Color maxColor
)

Parameters

minType
The minimum scale type.
minValue
The minimum scale value.
minColor
The minimum scale color.
maxType
The maximum scale type.
maxValue
The maximum scale value.
maxColor
The maximum scale color.

Return Value

The new two color scale rule.
Example
This example creates a two color scale rule.
var rule = GrapeCity.Xaml.SpreadSheet.Data.TwoColorScaleRule.Create(GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 1, Windows.UI.Colors.Yellow, GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 50, Windows.UI.Colors.Blue);
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.TwoColorScaleRule.Create(GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 1, Windows.UI.Colors.Yellow,
GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 50, Windows.UI.Colors.Blue)
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

TwoColorScaleRule Class
TwoColorScaleRule Members