Having trouble getting help?
Contact Support
Contact Support
Range Adorner in WPF Currency TextBox
18 Feb 20251 minute to read
Value of CurrencyTextBox can be visually indicated like a progress bar using range-adorner feature, this feature is disabled by default. You can show the adorner over CurrencyTextBox
control by setting EnableRangeAdorner property to true
. Default value of EnableRangeAdorner
is false
. The adorner layer can be filled in the control area on the basis of the minimum and maximum values with considering the given value. Range Adorner is not displayed when a MinValue
or MaxValue
property is not set.
<syncfusion:CurrencyTextBox x:Name="currencyTextBox" MinValue="0" MaxValue="100" Value="630" EnableRangeAdorner="True" />
CurrencyTextBox currencyTextBox = new CurrencyTextBox();
currencyTextBox.MinValue = 0;
currencyTextBox.MaxValue = 1000;
currencyTextBox.Value = 630;
currencyTextBox.EnableRangeAdorner =true;
Changing background of range-adorner
You can change the background color of the range adorner using RangeAdornerBackground property.
<syncfusion:CurrencyTextBox x:Name="currencyTextBox" MinValue="0" MaxValue="1000" Value="570" EnableRangeAdorner="True" RangeAdornerBackground="LightGreen"/>
CurrencyTextBox currencyTextBox = new CurrencyTextBox();
currencyTextBox.MinValue = 0;
currencyTextBox.MaxValue = 100;
currencyTextBox.Value = 570;
currencyTextBox.EnableRangeAdorner = true;
currencyTextBox.RangeAdornerBackground = Brushes.LightGreen;