Category / Section
How to set the focused background and foreground color in WPF UpDown?
1 min read
You can change the background and foreground of WPF UpDown control by using FocusedBackground and FocusedForeground property. This feature can be enabled by setting EnableFocusedColors property to true.
XAML:
//Code Explains How to set the FocusBackground and FocusForeground color in UpDown <Grid> <syncfusion:UpDown Name="UpDown" Width="150" Height="70" EnableFocusedColors="True" FocusedBackground="Yellow" FocusedForeground="Red"></syncfusion:UpDown> </Grid>
C#
//Code Explains How to set the FocusBackground and FocusForeground color in UpDown namespace UpDown { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); UpDown.EnableFocusedColors = true; UpDown.FocusedBackground = Brushes.Yellow; UpDown.FocusedForeground = Brushes.Red; } } }
FocusBackground
FocusForeground