Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / DatabarConditionalFormattingRule Class / Minimum Property
Example


In This Topic
    Minimum Property (DatabarConditionalFormattingRule)
    In This Topic
    Gets or sets the minimum value. Note: The minimum value only accepts the ConditionalFormattingValue object which has a Type property such as Min, AutoMin, Number, Percent, Formula, or Pecentile.
    Syntax
    'Declaration
     
    Public Property Minimum As ConditionalFormattingValue
    'Usage
     
    Dim instance As DatabarConditionalFormattingRule
    Dim value As ConditionalFormattingValue
     
    instance.Minimum = value
     
    value = instance.Minimum
    public ConditionalFormattingValue Minimum {get; set;}

    Property Value

    The minimum.
    Example
    This example sets the Minimum property.
    fpSpread1.Sheets[0].Cells[0, 0].Value = 2;
    fpSpread1.Sheets[0].Cells[1, 0].Value = -1;
    fpSpread1.Sheets[0].Cells[3, 0].Value = 3;
    FarPoint.Win.Spread.DatabarConditionalFormattingRule dataBarRule = new FarPoint.Win.Spread.DatabarConditionalFormattingRule();
    dataBarRule.AxisPosition = FarPoint.Win.Spread.DataBarAxisPosition.Automatic;
    dataBarRule.BorderColor = Color.Blue;
    dataBarRule.NegativeFillColor = Color.Red;
    dataBarRule.Gradient = true;
    dataBarRule.Maximum = new FarPoint.Win.Spread.ConditionalFormattingValue(FarPoint.Win.Spread.ConditionalFormattingValueType.AutoMax);
    dataBarRule.Minimum = new FarPoint.Win.Spread.ConditionalFormattingValue(FarPoint.Win.Spread.ConditionalFormattingValueType.AutoMin);
    dataBarRule.UseNegativeFillColor = true;
    dataBarRule.UseNegativeBorderColor = false;
    
    FarPoint.Win.Spread.ConditionalFormatting cf = new FarPoint.Win.Spread.ConditionalFormatting(new FarPoint.Win.Spread.Model.CellRange(0, 0, 4, 1));
    cf.Add(dataBarRule);
    fpSpread1.ActiveSheet.Models.ConditionalFormatting.Add(cf);
    fpSpread1.Sheets(0).Cells(0, 0).Value = 2
    fpSpread1.Sheets(0).Cells(1, 0).Value = -1
    fpSpread1.Sheets(0).Cells(3, 0).Value = 3
    Dim dataBarRule As New FarPoint.Win.Spread.DatabarConditionalFormattingRule()
    dataBarRule.AxisPosition = FarPoint.Win.Spread.DataBarAxisPosition.Automatic
    dataBarRule.BorderColor = Color.Blue
    dataBarRule.NegativeFillColor = Color.Red
    dataBarRule.Gradient = True
    dataBarRule.Maximum = New FarPoint.Win.Spread.ConditionalFormattingValue(FarPoint.Win.Spread.ConditionalFormattingValueType.AutoMax)
    dataBarRule.Minimum = New FarPoint.Win.Spread.ConditionalFormattingValue(FarPoint.Win.Spread.ConditionalFormattingValueType.AutoMin)
    dataBarRule.UseNegativeFillColor = True
    dataBarRule.UseNegativeBorderColor = False
    
    Dim cf As New FarPoint.Win.Spread.ConditionalFormatting(New FarPoint.Win.Spread.Model.CellRange(0, 0, 4, 1))
    cf.Add(dataBarRule)
    fpSpread1.ActiveSheet.Models.ConditionalFormatting.Add(cf)
    See Also