/// <summary> /// Ändert das Aussehen wertebasierend /// </summary> public void ResolveAppearance(ref AppearanceData appData, ref AppearancePropFlags flags, object dataValue, IConditionContextProvider context) { if (this.HighlightNegativeValues) { this.negativeValueAppearance.ResolveAppearance(ref appData, ref flags, dataValue, context); } if (this.ShowTrendIndicators) { this.iconValueAppearance.ResolveAppearance(ref appData, ref flags, dataValue, context); } }
/// <summary> /// Ändert das Aussehen wertebasierend /// </summary> public void ResolveAppearance(ref AppearanceData appData, ref AppearancePropFlags flags, object dataValue, IConditionContextProvider context) { if (Double.TryParse(Convert.ToString(dataValue), out double value)) { double threshold = 0.05; if (value < -threshold) { IconValueAppearance.negativeAppearance.MergeData(ref appData, ref flags); } else if (value > threshold) { IconValueAppearance.positiveAppearance.MergeData(ref appData, ref flags); } else { IconValueAppearance.neutralAppearance.MergeData(ref appData, ref flags); } } }
/// <summary> /// Ändert das Aussehen wertebasierend /// </summary> public void ResolveAppearance(ref AppearanceData appData, ref AppearancePropFlags flags, object dataValue, IConditionContextProvider context) { double value; if (Double.TryParse(Convert.ToString(dataValue), out value)) { if (value < 0) { NegativeValueAppearance.negativeAppearance.MergeData(ref appData, ref flags); } } }