Click here to Skip to main content
13,002,163 members (75,825 online)
Rate this:
Please Sign up or sign in to vote.
See more: , +
I have a DataGrid which have on DateTime column. but i am unable to change the style of the calender.please help me somebody. the code is here
<dg:DataGridTemplateColumn Header="DOB" MinWidth="100" >
                            <Style TargetType="{x:Type dg:DataGridColumnHeader}">
                                <Setter Property="Background" Value="Green"/>
                                <Setter Property="Foreground" Value="Black"/>
                                <Setter Property="FontSize" Value="20"/>
                                <Setter Property="HorizontalContentAlignment" Value="Center" />
                                <Setter Property="Width" Value="Auto"/>
                                <dg:DatePicker SelectedDate="{Binding DOB}" SelectedDateFormat="Short"  
                                                CalendarStyle="DynamicResource CalenderControlTemplate"/>                                
                                <TextBlock Text="{Binding DOB, StringFormat=d}" 
                                           Foreground="Crimson" HorizontalAlignment="Center" />

Posted 14-Jan-12 3:59am
Nestor Arturo 16-Jan-12 9:21am
Do you mean that 'CalendarStyle="DynamicResource CalenderControlTemplate"' is not working?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 14 Jan 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100