<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Designer Silverlight &#187; Styles and Templates</title>
	<atom:link href="http://www.designersilverlight.com/category/styles-and-templates/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designersilverlight.com</link>
	<description>Matthias Shapiro's Silverlight &#38; WPF Blog - Because Developers Get All The Good Blogs</description>
	<lastBuildDate>Thu, 26 Jan 2012 06:45:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Theme Forcing for Windows Phone 7 (Silverlight)</title>
		<link>http://www.designersilverlight.com/2011/01/17/theme-forcing-for-windows-phone-7-silverlight/</link>
		<comments>http://www.designersilverlight.com/2011/01/17/theme-forcing-for-windows-phone-7-silverlight/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 05:53:16 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[color]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Styles and Templates]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[XAML]]></category>
		<category><![CDATA[app bar]]></category>
		<category><![CDATA[applicationBar]]></category>
		<category><![CDATA[dark theme]]></category>
		<category><![CDATA[force a theme]]></category>
		<category><![CDATA[light theme]]></category>
		<category><![CDATA[resourcedictionary]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[theming]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/2011/01/17/theme-forcing-for-windows-phone-7-silverlight/</guid>
		<description><![CDATA[Let&#8217;s say you don&#8217;t really want to play nice with the theming engine in Windows Phone 7. This would be pretty understandable&#8230; when you play nice with theming you either need to 1) come up with some nice innovative solution that detects themes and sets brushes and colors dynamically or 2) use only the black, [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you don&#8217;t really want to play nice with the theming engine in Windows Phone 7. This would be pretty understandable&#8230; when you play nice with theming you either need to 1) come up with some nice innovative solution that detects themes and sets brushes and colors dynamically or 2) use only the black, white, gray and accent colors that Windows Phone 7 theming gives you by default.</p>
<p>If you want to create a design that uses some custom colors, it can be difficult to make sure those colors fit both themes, which can throw a cramp into your creative juices. Additionally, if you decide to toss theme-compatibility to the wind in favor of your own design, you&#8217;ll need to make sure all your control templates conform and don&#8217;t go all wonky when the user changes their theme.</p>
<p>This can be a pain.</p>
<p>To help in this endeavor, I would like to present two resource dictionaries and a sample project.</p>
<p><a href="http://designersilverlight.com/wp-content/uploads/2011/01/DarkStyles.xamly">DarkStyles.xamly</a> &#8211; rename to DarkStyles.xaml (irritating download issue)</p>
<p><a href="http://designersilverlight.com/wp-content/uploads/2011/01/LightStyles.xamly">LightStyles.xamly</a> &#8211; rename to LightStyles.xaml (irritating download issue)</p>
<p><a href="http://designersilverlight.com/wp-content/uploads/2011/01/ThemeResistantTemplate.zip">Theme Resistant Sample Project</a></p>
<p>The basic idea is that I found the source style resource dictionary for all the Windows Phone 7 controls. These styles are implicitly set by the system depending on the users’ settings. We can override these settings with our own local resources. So all we need to so is set either point to the LightStyles.xaml or the DarkStyles.xaml as resource dictionaries in the App.xaml and all the controls will ignore the system settings and conform to our defined settings. Another bonus is that you can use take these dictionaries and use them to play around with colors to see how a solid theme is built in Silverlight.</p>
<p>So, let’s quickly walk through the process of forcing a theme in your project.</p>
<p>First, use Blend. It’s awesome. (You could probably use Visual Studio too, I guess.)</p>
<p>In your project, if you don’t have a “Resources”  folder, right-click on your project and create that folder.&#8217;</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2011/01/image5.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.designersilverlight.com/wp-content/uploads/2011/01/image_thumb5.png" border="0" alt="image" width="285" height="191" /></a></p>
<p>Now right click on your Resources folder and “Add An Existing Item…”. In the resulting pop-up navigate to either the DarkStyles.xaml or the LightStyles.xaml file.</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2011/01/image6.png"><img style="background-image: none; margin: 5px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.designersilverlight.com/wp-content/uploads/2011/01/image_thumb6.png" border="0" alt="image" width="315" height="132" /></a></p>
<p>This should add the necessary code auto-magically into your App.xaml, but double check. You should see something like this:</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2011/01/image7.png"><img style="background-image: none; margin: 5px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.designersilverlight.com/wp-content/uploads/2011/01/image_thumb7.png" border="0" alt="image" width="518" height="127" /></a></p>
<p>And that’s it! Sort of. I want to make note of a couple of clean-up issues.</p>
<h2>Use Blend To Check Themes</h2>
<p>First of all, you should know how to quickly test theming changes in Blend. In the top left-hand corner, you should see a set of tabs that say “Parts”, “Projects”, “Assets” etc. If it doesn’t say “Devices”, go to the menu bar and select “Window –&gt; Device”. This will bring up a tab that looks like this:</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2011/01/image8.png"><img style="background-image: none; margin: 5px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.designersilverlight.com/wp-content/uploads/2011/01/image_thumb8.png" border="0" alt="image" width="376" height="137" /></a></p>
<p>From here you can change the theme and accent on the fly and see the changes in your design without running the app.</p>
<p>HOWEVER!</p>
<p>Some things don’t show up very well in the Blend theming, so always always always test your app on the emulator or on the phone.</p>
<h2>Set Your Root Background</h2>
<p>One of those things is that the default status for a PhoneApplicationPage is to have a transparent background. You’ll want to make sure that the LayoutRoot Grid (or layout element) in your application has the background set to “PhoneBackgroundBrush”.</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2011/01/image9.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.designersilverlight.com/wp-content/uploads/2011/01/image_thumb9.png" border="0" alt="image" width="325" height="233" /></a></p>
<h2>Turn Off Your System Tray (Maybe)</h2>
<p>Next, you might want to turn off the System Tray at the top of your app. That’s this thing</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2011/01/image10.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.designersilverlight.com/wp-content/uploads/2011/01/image_thumb10.png" border="0" alt="image" width="244" height="45" /></a></p>
<p>You have no control over what color it is, only whether or not it can be seen. Select the PhoneApplicationPage in your “Objects and Timeline” tab and uncheck the “Show SystemTray”. This is not a must (most apps will still look fine with the SystemTray on) but it’s something to think about</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2011/01/image11.png"><img style="background-image: none; margin: 5px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.designersilverlight.com/wp-content/uploads/2011/01/image_thumb11.png" border="0" alt="image" width="285" height="154" /></a></p>
<h2>Set The Colors On Your App Bar</h2>
<p>Finally, if you have an Application Bar in your screen, you’ll want to make sure the colors are explicitly set on those. (Don’t know how to make an application bar? <a href="http://www.designersilverlight.com/2011/01/17/app-bars-in-windows-phone-7-in-blend/">Check this post out.</a>) Select the ApplicationBar in your “Objects and Timeline”. Now click on the little box next to the BackgroundColor property and select “Local Resources –&gt; PhoneChromeColor”.</p>
<p><a href="http://www.designersilverlight.com/wp-content/uploads/2011/01/image12.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.designersilverlight.com/wp-content/uploads/2011/01/image_thumb12.png" border="0" alt="image" width="474" height="230" /></a></p>
<p>Similarly, set the ForegroundColor to “LocalResources –&gt; PhoneForegroundColor”.You’re all set… you now have a theme-proof application.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2011/01/17/theme-forcing-for-windows-phone-7-silverlight/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Theme+Forcing+for+Windows+Phone+7+%28Silverlight%29+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D1232" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Theme+Forcing+for+Windows+Phone+7+%28Silverlight%29+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D1232" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2011/01/17/theme-forcing-for-windows-phone-7-silverlight/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>WPF, Silverlight and Design Links for 09/08/09</title>
		<link>http://www.designersilverlight.com/2009/09/08/wpf-silverlight-and-design-links-for-090809/</link>
		<comments>http://www.designersilverlight.com/2009/09/08/wpf-silverlight-and-design-links-for-090809/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 18:44:58 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[Helpful Links]]></category>
		<category><![CDATA[Silverlight 3]]></category>
		<category><![CDATA[Styles and Templates]]></category>
		<category><![CDATA[treemap]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.designersilverlight.com/?p=818</guid>
		<description><![CDATA[I finally cleaned out my Google Reader list and picked out the stuff I like. Carsonified » 5 Advanced Photoshop Techniques for Web Designers Carsonified » Advanced Photoshop Techniques for Web Designers – Part 2 Source code for “WPF Control Development Unleashed” &#8211; From Pavan Podila, control development in WPF is pretty powerful&#8230; might be [...]]]></description>
			<content:encoded><![CDATA[<p>I finally cleaned out my Google Reader list and <a href="http://www.google.com/reader/shared/user/15377382774218134057/state/com.google/starred">picked out the stuff I like</a>.</p>
<ul>
<li><a href="http://carsonified.com/blog/design/5-advanced-photoshop-techniques-for-web-designers/">Carsonified » 5 Advanced Photoshop Techniques for Web Designers</a></li>
<li><a href="http://carsonified.com/blog/design/photoshp/advanced-photoshop-techniques-for-web-designers-part-2/">Carsonified » Advanced Photoshop Techniques for Web Designers – Part 2</a></li>
<li><a href="http://feedproxy.google.com/~r/Pixel-In-Gene/~3/pgtpSEpnOXA/">Source code for “WPF Control Development Unleashed”</a> &#8211; From Pavan Podila, control development in WPF is pretty powerful&#8230; might be a good idea to check out his book.</li>
<li><a href="http://feedproxy.google.com/~r/Pixel-In-Gene/~3/bVgbD40BX8k/">A SilverLight TreeMap control</a> &#8211; I can&#8217;t believe I missed this for so long. I need to dig into this a little more, but if this really works the way it looks, everyone should be worshiping Pavan Podila over at Pixel in Gene. This is an info vis dream come true.</li>
<li><a href="http://blogs.msdn.com/wpfsdk/archive/2009/08/27/implicit-styles-templates-controls-and-frameworkelements.aspx">Implicit Styles, Templates, Controls and FrameworkElements</a> &#8211; From the Windows Presentation Foundation SDK team, Carole Snyder has a post on implicit styles&#8230; definately an under-appreciated topic in WPF</li>
<li><a href="http://blogs.msdn.com/jaimer/archive/2009/08/11/expression-studio-tutorials-starter-kit.aspx">Expression Studio Tutorials Starter Kit</a> &#8211; Jaime Rodriguez continues to be awesome</li>
<li><a href="http://www.smashingmagazine.com/2009/08/10/mastering-css-advanced-techniques-and-tools/">Mastering CSS, Part 2: Advanced Techniques and Tools</a> &#8211; From Smashing Magazine and includes a section on iPhone CSS techniques</li>
<li><a href="http://www.smashingmagazine.com/2009/08/11/how-to-create-your-first-iphone-application/">How to Create Your First iPhone Application</a> &#8211; Yet another &#8220;Make an iPhone app&#8221; guide</li>
<li><a href="http://www.smashingmagazine.com/2009/08/14/how-to-effectively-communicate-with-developers/">How To Effectively Communicate With Developers</a> &#8211; The graphic is hilarious.</li>
<li><a href="http://www.smashingmagazine.com/2009/08/20/typographic-design-survey-best-practices-from-the-best-blogs/">Typographic Design Patterns and Best Practices</a> &#8211; Good for people who want to start digging into the typographic world</li>
<li><a href="http://www.smashingmagazine.com/2009/08/23/50-useful-new-jquery-techniques/">50 Useful New jQuery Techniques and Tutorials</a> &#8211; 50 is kind of a lot, but this is from Smashing Magazine, whose motto is &#8220;The most compelling link dumps in the design community&#8221;</li>
</ul>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.designersilverlight.com/2009/09/08/wpf-silverlight-and-design-links-for-090809/&amp;layout=standard&amp;show_faces=1&amp;width=450&amp;action=like&amp;colorscheme=light&amp;font=" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px"></iframe><div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF%2C+Silverlight+and+Design+Links+for+09%2F08%2F09+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D818" title="Post to Twitter"><img class="nothumb" src="http://www.designersilverlight.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=WPF%2C+Silverlight+and+Design+Links+for+09%2F08%2F09+http%3A%2F%2Fdesignersilverlight.com%2F%3Fp%3D818" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.designersilverlight.com/2009/09/08/wpf-silverlight-and-design-links-for-090809/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

