Recently I used the calendar control when writing a program. In the program, a large calendar is required because the touch screen is used,
Because it can be dragged out directly when you use calendar, you have not paid much attention to the calendar owner.
Because I have not been familiar with WPF for a long time, I set the calendar style for half a day, so I wrote it on my blog.
It is completely for some new users. It is also a kind of communication to hope to help them,
There may still be many shortcomings, but they mainly provide some small information for new users. As for how to make full use of them, ^.
1. Increase the calendar size.
Drag a calendar control in Microsoft Expression blend 4 and right-click it.
Select edit a copy... in edit template, and then enter the control, and then in XAML
Delete the <stackpanel/> label,Note that <stackpanel/> there is also a <calendaritem/> do not delete, only delete <stackpanel/>
2. Set the calendardaybutton attribute of the calendar.
After completing the first step, create a resource. For resources of the calendardaybutton, see the following:
<Window. Resources>
<Style targettype = "calendardaybutton" X: Key = "calendardaybutton">
<Style. triggers>
<Eventtrigger routedevent = "calendardaybutton. Click">
<! -- <Sele property = "isvisible" value = "false"/> -->
</Eventtrigger>
</Style. triggers>
<Setter property = "width" value = "70"/>
<Setter property = "height" value = "70"/>
<Setter property = "fontsize" value = "20"/>
<Setter property = "foreground" value = "blue"/>
<! -- <Setter property = "background" value = "white"/> -->
<Setter property = "background">
<Setter. value>
<Radialgradientbrush>
<Gradientstop color = "# ffa1a1a1" offset = "0"/>
<Gradientstop color = "# ff8babce" offset = "0.8"/>
<Gradientstop color = "# ff8babce" offset = "1"/>
</Radialgradientbrush>
</Setter. value>
</Setter>
</Style>
</Window. Resources>
Then, the resource: calendardaybuttonstyle = "{staticresource calendardaybutton}" is referenced in the calendardaybutton attribute of the calendar }"
Then OK
**************************************** *****************************
I hope some experts can teach WPF some learning suggestions and guidance.