GrapeCity.Xaml.SpreadSheet.Data
MidpointValue Property
Example 


Gets or sets the midpoint scale value.
Syntax
'Declaration
 
Public Property MidpointValue As Object
'Usage
 
Dim instance As ThreeColorScaleRule
Dim value As Object
 
instance.MidpointValue = value
 
value = instance.MidpointValue
public object MidpointValue {get; set;}
Example
This example creates a three color scale rule.
GcSpreadSheet1.Sheets[0].Cells[0, 0].Value = -1;
GcSpreadSheet1.Sheets[0].Cells[1, 0].Value = 49;
GcSpreadSheet1.Sheets[0].Cells[2, 0].Value = 101;
GrapeCity.Xaml.SpreadSheet.Data.ThreeColorScaleRule rule = new GrapeCity.Xaml.SpreadSheet.Data.ThreeColorScaleRule();
rule.MinimumColor = Windows.UI.Colors.Yellow;
rule.MinimumType = GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number;
rule.MinimumValue = 1;
rule.MidpointColor = Windows.UI.Colors.Blue;
rule.MidpointType = GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number;
rule.MidpointValue = 50;
rule.MaximumColor = Windows.UI.Colors.Red;
rule.MaximumType = GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number;
rule.MaximumValue = 100;
rule.Ranges = new GrapeCity.Xaml.SpreadSheet.Data.CellRange[] { new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 20, 1) };
GcSpreadSheet1.Sheets[0].ConditionalFormats.AddRule(rule); 
GcSpreadSheet1.Sheets(0).Cells(0, 0).Value = -1
GcSpreadSheet1.Sheets(0).Cells(1, 0).Value = 49
GcSpreadSheet1.Sheets(0).Cells(2, 0).Value = 101
Dim rule As New GrapeCity.Xaml.SpreadSheet.Data.ThreeColorScaleRule()
rule.MinimumColor = Windows.UI.Colors.Yellow
rule.MinimumType = GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number
rule.MinimumValue = 1
rule.MidpointColor = Windows.UI.Colors.Blue
rule.MidpointType = GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number
rule.MidpointValue = 50
rule.MaximumColor = Windows.UI.Colors.Red
rule.MaximumType = GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number
rule.MaximumValue = 100
rule.Ranges = New GrapeCity.Xaml.SpreadSheet.Data.CellRange() { New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 20, 1) }
GcSpreadSheet1.Sheets(0).ConditionalFormats.AddRule(rule)
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

ThreeColorScaleRule Class
ThreeColorScaleRule Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options