Appearance and Styling in UWP DatePicker (SfDatePicker)

10 May 20212 minutes to read

Accent Brush

The AccentBrush property is used to decorate the hot spots of a control with a solid color.

  • XAML
  • <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
    
            <syncfusion:SfDatePicker  VerticalAlignment="Center"
    
                                    HorizontalAlignment="Center"
    
                                    Width="200"
    
                                    AccentBrush="Green"/>
    
    </Grid>

    The following image shows the control with various Accent brushes:

    Appearance-and-Styling_img1

    Selected Foreground

    The SelectedForeground property is used to change the foreground color of the Selected Date

  • XAML
  • <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
    
            <syncfusion:SfDatePicker VerticalAlignment="Center"
    
                             HorizontalAlignment="Center"
    
                             Width="200">
    
                <syncfusion:SfDatePicker.SelectorStyle>
    
                    <Style TargetType="syncfusion:SfDateSelector">
                     
                        <Setter Property="SelectedForeground" Value="Red"/>
                        
                    </Style>
    
                </syncfusion:SfDatePicker.SelectorStyle>
    
            </syncfusion:SfDatePicker>
    
    </Grid>

    Appearance-and-Styling_img2