Spread Silverlight Documentation
MidpointValue Property
Example 


Gets or sets the midpoint scale value.
Syntax
'Declaration
 
Public Property MidpointValue As System.Object
'Usage
 
Dim instance As ThreeColorScaleRule
Dim value As System.Object
 
instance.MidpointValue = value
 
value = instance.MidpointValue
public System.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.Windows.SpreadSheet.Data.ThreeColorScaleRule rule = new GrapeCity.Windows.SpreadSheet.Data.ThreeColorScaleRule();
rule.MinimumColor = Colors.Yellow;
rule.MinimumType = GrapeCity.Windows.SpreadSheet.Data.ScaleValueType.Number;
rule.MinimumValue = 1;
rule.MidpointColor = Colors.Blue;
rule.MidpointType = GrapeCity.Windows.SpreadSheet.Data.ScaleValueType.Number;
rule.MidpointValue = 50;
rule.MaximumColor = Colors.Red;
rule.MaximumType = GrapeCity.Windows.SpreadSheet.Data.ScaleValueType.Number;
rule.MaximumValue = 100;
rule.Ranges = new GrapeCity.Windows.SpreadSheet.Data.CellRange[] { new GrapeCity.Windows.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.Windows.SpreadSheet.Data.ThreeColorScaleRule()
rule.MinimumColor = Colors.Yellow
rule.MinimumType = GrapeCity.Windows.SpreadSheet.Data.ScaleValueType.Number
rule.MinimumValue = 1
rule.MidpointColor = Colors.Blue
rule.MidpointType = GrapeCity.Windows.SpreadSheet.Data.ScaleValueType.Number
rule.MidpointValue = 50
rule.MaximumColor = Colors.Red
rule.MaximumType = GrapeCity.Windows.SpreadSheet.Data.ScaleValueType.Number
rule.MaximumValue = 100
rule.Ranges = New GrapeCity.Windows.SpreadSheet.Data.CellRange() { New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 20, 1) }
GcSpreadSheet1.Sheets(0).ConditionalFormats.AddRule(rule)
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

ThreeColorScaleRule Class
ThreeColorScaleRule Members

 

 


Copyright © GrapeCity, inc. All rights reserved.