This question is locked. New answers and comments are not allowed.
The DatePicker Background comes out looking fine when using named brushes, but when setting in codebehind or using styles in codebehind it does not look correct. Please see attached file screenshots.
1. DatePicker background set using named brushes, looks fine.
2. DatePicker background set using code behind does not look good. (Comes out with a bit of red in the back, but mostly pink)
3. DatePicker background set using styles in code behind does not look good. (Comes out with a bit of red in the back, but mostly pink)
1. DatePicker background set using named brushes, looks fine.
<SolidColorBrush x:Key="TelerikDateTimePickerBackgroundBrush" Color="Red" /><SolidColorBrush x:Key="TelerikDateTimePickerForegroundBrush" Color="Black" /><SolidColorBrush x:Key="TelerikDateTimePickerBorderBrush" Color="Red" />2. DatePicker background set using code behind does not look good. (Comes out with a bit of red in the back, but mostly pink)
datePicker = new RadDatePicker();datePicker.Background = new SolidColorBrush(Colors.Red);3. DatePicker background set using styles in code behind does not look good. (Comes out with a bit of red in the back, but mostly pink)
Style dateTimePickerButtonStyle = new Style();dateTimePickerButtonStyle.TargetType = typeof(DateTimePickerButton); dateTimePickerButtonStyle.Setters.Add(new Setter() { Property = DateTimePickerButton.FontSizeProperty, Value = base.FontSize() });dateTimePickerButtonStyle.Setters.Add(new Setter() { Property = DateTimePickerButton.BackgroundProperty, Value = new SolidColorBrush(backgroundColor) });datePicker.Resources.Add(typeof(DateTimePickerButton), dateTimePickerButtonStyle);