Click here to Skip to main content
11,715,165 members (64,089 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: WPF C#4.0 DataGrid , +
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 at 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
0 Sergey Alexandrovich Kryukov 495
1 Richard MacCutchan 275
2 Maciej Los 259
3 ManasKumarM 155
4 Frankie-C 125
0 Sergey Alexandrovich Kryukov 775
1 CHill60 415
2 Richard MacCutchan 405
3 Maciej Los 389
4 OriginalGriff 320

Advertise | Privacy | Mobile
Web04 | 2.8.150901.1 | Last Updated 14 Jan 2012
Copyright © CodeProject, 1999-2015
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