This project is read-only.

Border or Background color problem

Apr 30, 2013 at 12:21 PM
I cant change border or backgroud color of the control.

How can i do that ?

May 2, 2013 at 7:12 PM
You can change the background and border color of a CurrencyTextBox the same way you would with any TextBox or control:
<currency:CurrencyTextBox Background="Purple" BorderBrush="Green" BorderThickness="2" />
Or you can modify the template of the control and have complete control over how it looks, but this is a more advanced approach.
May 3, 2013 at 9:29 AM
Yes, you rigth. Its ok in xaml but what about code side ?

I try like this but no change

__txtPriceSales.BorderBrush = Brushes.Red;
txtPriceSales.BorderBrush = new SolidColorBrush(Colors.Red);__

Thank you
May 3, 2013 at 8:36 PM
CurrencyTextBox behaves just like a TextBox from code-behind as well:
private void myCurrencyTextBox_Loaded(object sender, RoutedEventArgs e)
    var ctb = sender as CurrencyTextBox;
    ctb.BorderBrush = Brushes.Blue;
In fact, you can even cast the CurrencyTextBox down to a TextBox:
private void myCurrencyTextBox_Loaded(object sender, RoutedEventArgs e)
    var tb = sender as TextBox;
    tb.BorderBrush = Brushes.Blue;
If you feel that CurrencyTextBox is not behaving the same as TextBox, please create a new Issue and supply more detailed information.