<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Templating the Silverlight Calendar [Jason Cooke]</title><link>http://blogs.msdn.com/b/kathykam/archive/2008/08/25/templating-the-silverlight-calendar-jason-cooke.aspx</link><description>&amp;lt;Editorial Note&amp;gt; I am delighted to have Jason to write this awesome blog showing everyone how to retemplate the Calendar using Silverlight Beta 2. Let us know what you think! &amp;lt;/Editorial Note&amp;gt; 
 My name is Jason Cooke. I work as tester for</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Templating the Silverlight Calendar [Jason Cooke]</title><link>http://blogs.msdn.com/b/kathykam/archive/2008/08/25/templating-the-silverlight-calendar-jason-cooke.aspx#9470730</link><pubDate>Wed, 11 Mar 2009 19:39:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9470730</guid><dc:creator>Richard</dc:creator><description>&lt;p&gt;Are you able to even set data driven events for the dates?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9470730" width="1" height="1"&gt;</description></item><item><title>re: Templating the Silverlight Calendar [Jason Cooke]</title><link>http://blogs.msdn.com/b/kathykam/archive/2008/08/25/templating-the-silverlight-calendar-jason-cooke.aspx#9414742</link><pubDate>Thu, 12 Feb 2009 17:27:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9414742</guid><dc:creator>Brandon</dc:creator><description>&lt;p&gt;Working with the final release of Silverlight 2 I'm trying to template a calendar. &amp;nbsp;More specifically I'm trying to set the background color of the CalendarDayButton if there is an event scheduled for that day.&lt;/p&gt;
&lt;p&gt;Is there an easy way to get this done now?&lt;/p&gt;
&lt;p&gt;I found this link and have modified the code slightly I can get the font to Bold but It won't let me set background or foreground colors.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="https://silverlight.net/forums/t/18744.aspx"&gt;https://silverlight.net/forums/t/18744.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;private void MonthView_Loaded(object sender, RoutedEventArgs e)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Grid g = (Grid)sender;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (int i = 0; i &amp;lt; VisualTreeHelper.GetChildrenCount(g); i++)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CalendarDayButton day = VisualTreeHelper.GetChild(g, i) as CalendarDayButton;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (day != null)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DateTime t = (DateTime)day.DataContext;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (t.Date == DateTime.Today.AddDays(1))&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;day.Background = new SolidColorBrush(Color.FromArgb(0, 255, 255, 0));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//day.Content = &amp;quot;Tomorrow&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;day.FontWeight = FontWeights.Bold;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;day.Foreground = new SolidColorBrush(Color.FromArgb(0, 255, 255, 0));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9414742" width="1" height="1"&gt;</description></item><item><title>re: Templating the Silverlight Calendar [Jason Cooke]</title><link>http://blogs.msdn.com/b/kathykam/archive/2008/08/25/templating-the-silverlight-calendar-jason-cooke.aspx#9367320</link><pubDate>Thu, 22 Jan 2009 16:16:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9367320</guid><dc:creator>Darren</dc:creator><description>&lt;p&gt;Is this still required? &amp;nbsp;You mention that this will be easier in SL2 -- I still can't seem to work out how to do it though... &amp;nbsp;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9367320" width="1" height="1"&gt;</description></item><item><title>re: Templating the Silverlight Calendar [Jason Cooke]</title><link>http://blogs.msdn.com/b/kathykam/archive/2008/08/25/templating-the-silverlight-calendar-jason-cooke.aspx#8900688</link><pubDate>Wed, 27 Aug 2008 19:41:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8900688</guid><dc:creator>Justin-Josef Angel [MSFT]</dc:creator><description>&lt;p&gt;Jason, this is amazing work! &lt;/p&gt;
&lt;p&gt;Really smart hack, way to go. &lt;/p&gt;
&lt;p&gt;keep it up,&lt;/p&gt;
&lt;p&gt;-- Justin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8900688" width="1" height="1"&gt;</description></item><item><title>Silverlight Cream for August 26, 2008 -- #356</title><link>http://blogs.msdn.com/b/kathykam/archive/2008/08/25/templating-the-silverlight-calendar-jason-cooke.aspx#8898631</link><pubDate>Wed, 27 Aug 2008 03:34:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8898631</guid><dc:creator>Community Blogs</dc:creator><description>&lt;p&gt;Scott Barnes on Submitting SL Bugs, Shawn Wildermuth on SL Firestarter in NYC, Jason Cooke Templatinging&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8898631" width="1" height="1"&gt;</description></item><item><title>re: Templating the Silverlight Calendar [Jason Cooke]</title><link>http://blogs.msdn.com/b/kathykam/archive/2008/08/25/templating-the-silverlight-calendar-jason-cooke.aspx#8897514</link><pubDate>Tue, 26 Aug 2008 17:44:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8897514</guid><dc:creator>James Hancock</dc:creator><description>&lt;p&gt;Hideous fonts. yuk.... horrible. no silverlight until fonts fixed... yuk!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8897514" width="1" height="1"&gt;</description></item><item><title>send flowers &amp;raquo; Templating the Silverlight Calendar [Jason Cooke]</title><link>http://blogs.msdn.com/b/kathykam/archive/2008/08/25/templating-the-silverlight-calendar-jason-cooke.aspx#8896363</link><pubDate>Tue, 26 Aug 2008 09:30:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8896363</guid><dc:creator>send flowers &amp;raquo; Templating the Silverlight Calendar [Jason Cooke]</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://hubsfunnywallpaper.cn/?p=2299"&gt;http://hubsfunnywallpaper.cn/?p=2299&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8896363" width="1" height="1"&gt;</description></item></channel></rss>