<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Nothing but .NET</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/madenwal/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/madenwal/feed.xml</link>
    <description>Tips, tricks, and lessons learned from building .NET, Windows 8, Azure, and Windows Phone solutions and working with other Microsoft products</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:16:09 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Sending e-mail from ASP.NET MVC hosted on Azure with a GoDaddy.com domain address</title>
      <link>https://docs.microsoft.com/archive/blogs/madenwal/385</link>
      <pubDate>Tue, 28 Jun 2016 17:15:16 GMT</pubDate>
      <dc:creator><![CDATA[Mohammed Adenwala]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madenwal/?p=385</guid>
      <description><![CDATA[I have a website built with ASP.NET MVC and EntityFramework which is hosted on Microsoft Azure. The...]]></description>
      <content:encoded><![CDATA[<span style="color: #333333;font-family: Segoe UI;font-size: 10pt">I have a website built with <a href="http://www.asp.net/mvc">ASP.NET MVC</a> and <a href="https://msdn.microsoft.com/en-us/data/ef.aspx">EntityFramework</a> which is hosted on <a href="https://azure.microsoft.com/">Microsoft Azure</a>. The domain used for this website was purchased on <a href="https://www.godaddy.com/">GoDaddy.com</a> and configured to point to the Azure Websites address. This domain on GoDaddy is purely a domain name with no other features. I wanted to get e-mail working from the website and it turns out that GoDaddy allows for I believe two e-mail accounts to be created for free with the domain name without having to create your own email server or pay for any other service, even through GoDaddy. You can configure those free email accounts through <a href="https://wcc.godaddy.com/">GoDaddy's Workspace Control Center</a> portal as follows:
</span>

<img src="https://msdnshared.blob.core.windows.net/media/2016/06/062816_1748_Sendingemai1.png" alt="" />

<span style="color: #333333;font-family: Segoe UI;font-size: 10pt">Once the free email accounts were setup, I was able to configure the EmailService with the below code to send an email via SMTP and the MailMessage/SmtpClient classes as well as the configuration necessary in the web.config file. Here's what you need to do to make e-mail work with your GoDaddy.com domain / email account.
</span><span style="color: black;font-family: Consolas;font-size: 9pt;background-color: white">
</span>
<pre><code>
public class EmailService : IIdentityMessageService
{
public async Task SendAsync(IdentityMessage message)
{
MailMessage msg = new MailMessage();
#if DEBUG
// Don't send actual emails while debugging, override to send emails to the sender instead.
message.Subject = "[DEBUG] " + message.Subject;
msg.To.Add(msg.From);
#else
// Production, send email -- if multiple recipients, add each recipient to BCC, else the TO line.
var emails = message.Destination.Split(';');
if (emails.Length &gt; 1)
{
foreach (var email in emails)
msg.Bcc.Add(email);
}
else
{
msg.To.Add(message.Destination);
}
#endif
msg.Subject = message.Subject;
msg.Body = message.Body;
msg.IsBodyHtml = true;
using (SmtpClient smtp = new SmtpClient())
{
smtp.ServicePoint.MaxIdleTime = 1;
smtp.Timeout = 10000;
await smtp.SendMailAsync(msg);
}
}
}
</code></pre>
<span style="color: #333333;font-family: Segoe UI;font-size: 10pt">In my web.config file, I add the configuration for my e-mail SMTP service. This is a great way to not have your configuration hardcoded in code.
</span>
<pre><code><span style="background-color: white">&lt;<span style="color: #a31515">system.net</span>&gt;
     &lt;<span style="color: #a31515">mailSettings</span>&gt;
          &lt;<span style="color: #a31515">smtp</span>
					<span style="color: red">from</span>=<span style="color: black">"sender</span>@contoso.com<span style="color: black">"</span>
					<span style="color: red">deliveryMethod</span>=<span style="color: black">"</span>Network<span style="color: black">"</span>&gt;
               &lt;<span style="color: #a31515">network</span>
					<span style="color: red">host</span>=<span style="color: black">"</span>smtpout.secureserver.net<span style="color: black">"</span>
					<span style="color: red">port</span>=<span style="color: black">"</span>3535<span style="color: black">"</span>
					<span style="color: red">userName</span>=<span style="color: black">"sender</span>@contoso.com<span style="color: black">"</span>
					<span style="color: red">password</span>=<span style="color: black">"</span>******<span style="color: black">"</span>
					<span style="color: red">enableSsl</span>=<span style="color: black">"</span>false<span style="color: black">"</span>
					<span style="color: red">defaultCredentials</span>=<span style="color: black">"</span>false<span style="color: black">"</span> /&gt;
          &lt;/<span style="color: #a31515">smtp</span>&gt;
     &lt;/<span style="color: #a31515">mailSettings</span>&gt;
&lt;/<span style="color: #a31515">system.net</span>&gt;</span>
			</code></pre>
<span style="color: #333333;font-family: Segoe UI;font-size: 10pt">
Hope this helps!</span>]]></content:encoded>
    </item>
    <item>
      <title>A deep-dive on Continuum for Windows 10 Mobile: Development best practices and ins-and-outs</title>
      <link>https://docs.microsoft.com/archive/blogs/madenwal/a-deep-dive-on-continuum-for-windows-10-mobile-development-best-practices-and-ins-and-outs</link>
      <pubDate>Thu, 17 Dec 2015 09:56:00 GMT</pubDate>
      <dc:creator><![CDATA[madenwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madenwal/2015/12/17/a-deep-dive-on-continuum-for-windows-10-mobile-development-best-practices-and-ins-and-outs/</guid>
      <description><![CDATA[Introduction
With Continuum for phone on Windows 10 Mobile, your phone can power an external screen...]]></description>
      <content:encoded><![CDATA[<h2><span style="color: #2e74b5; font-family: Calibri Light; font-size: medium;">Introduction</span></h2>
<p><span style="font-family: Calibri; font-size: small;">With </span><a href="http://www.microsoft.com/en-us/windows/continuum"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Continuum for phone</span></a><span style="font-family: Calibri; font-size: small;"> on Windows 10 Mobile, your phone can power an external screen allowing you to have the productivity of a PC in your pocket. Any time you connect your Continuum-capable phone to an external screen, you will be in Continuum mode. &nbsp;Your phone will continue acting like a phone and allow you to use it like how you normally would while your connected screen simultaneously gives you a desktop-like experience with a desktop shell and Start menu showing on that external screen (alternatively, you can go into advanced display settings on your phone and change from Continuum to Mirror mode if you just want to duplicate what you're seeing on your phone onto another screen).&nbsp; With your phone in continuum mode, your phone can support a mouse and keyboard connected to it.&nbsp; If you don&rsquo;t have a spare keyboard/mouse to use with your mobile device, you can use the keyboard/touchpad experience within the Continuum app on your phone to interact with external screen experience.&nbsp; Any Windows 10 application you have installed on your phone can be launched on that external screen in full screen and used with your physical or virtual mouse/keyboard (unless the developer opted-out of Continuum&nbsp;for that app, but more on that later).&nbsp;&nbsp;</span><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Calibri; font-size: small;">If you're building a Windows 10 universal app, then you're probably already thinking about different screen sizes and resolutions.&nbsp; If you built your app with </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/dn958435.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">responsive design</span></a><span style="font-family: Calibri; font-size: small;"> so that it adapts to work on all screen sizes, then in most cases all of that work you already did can accrue over to your app running on Continuum for phone without any more effort on your part (with some caveats, continue reading to learn more).&nbsp; Additionally, you can choose to extend your app with </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/mt282143.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">casting</span></a><span style="font-family: Calibri; font-size: small;"> and </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.projectionmanager.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">projection</span></a><span style="font-family: Calibri; font-size: small;"> APIs that can let your W10 universal apps have multi-screen experiences for your users and take advantage of an extra screen connected to your phone (more on this down below as well).&nbsp;&nbsp;</span></p>
<h2><span style="color: #2e74b5; font-family: Calibri Light; font-size: medium;">How to enable the Continuum experience from your mobile device</span></h2>
<p><span style="font-family: Calibri; font-size: small;">The only phones that support Continuum for Phone as of TODAY are the </span><a href="http://www.microsoftstore.com/store/msusa/en_US/list/Microsoft-Lumia-950/categoryID.70449200?icid=icid_us_catp_modg_phn_talk_101915"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Lumia 950</span></a><span style="font-family: Calibri; font-size: small;">, </span><a href="http://www.microsoftstore.com/store/msusa/en_US/pdp/Microsoft-Lumia-950-XL--Unlocked/productID.326602300"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Lumia 950XL</span></a><span style="font-family: Calibri; font-size: small;">, and the upcoming Acer Jade Primo.&nbsp; You&rsquo;ll access the Continuum experience by connecting your phone through a display adapter (wired experience through a </span><a href="http://www.amazon.com/s/?ie=UTF8&amp;keywords=usb+c+to+hdmi&amp;tag=mh0b-20&amp;index=aps&amp;hvadid=7003356650&amp;hvqmt=b&amp;hvbmt=bb&amp;hvdev=c&amp;ref=pd_sl_1vpn32txwl_b"><span style="color: #0000ff; font-family: Calibri; font-size: small;">USB Type-C to HDMI cable</span></a><span style="font-family: Calibri; font-size: small;"> or a docking&nbsp;device like the </span><a href="http://www.microsoft.com/en-us/mobile/accessory/hd-500/"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Microsoft Display Dock</span></a><span style="font-family: Calibri; font-size: small;">) or wirelessly through a Miracast enabled device (I recommend the </span><a href="http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&amp;field-keywords=Actiontec+Screenbeam+Pro"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Actiontec Screenbeam Pro</span></a><span style="font-family: Calibri; font-size: small;">).&nbsp; Optionally, you connect a Bluetooth keyboard/mouse directly to your phone or a USB keyboard/mouse through the </span><a href="http://www.microsoft.com/en-us/mobile/accessory/hd-500/"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Microsoft Display Dock</span></a><span style="font-family: Calibri; font-size: small;">. If you don't have a keyboard/mouse to use, use can use the precision track pad and on-screen keyboard built into the Continuum app running on your Windows 10 phone to control the external screen.&nbsp; Just an FYI, in case you didn&rsquo;t know, if you have an XBOX One, it supports Continuum wirelessly from your Continuum-enabled phone through the </span><a href="http://www.windowscentral.com/project-screen-your-phone-tablet-or-laptop-wireless-display-app-xbox-one"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Wireless Display app</span></a><span style="font-family: Calibri; font-size: small;"> found in the XBOX App Store.</span></p>
<h2><span style="color: #2e74b5; font-family: Calibri Light; font-size: medium;">App requirements to run on Continuum for Phone</span></h2>
<p><span style="font-family: Calibri; font-size: small;">To run on Continuum for phone, the app must be a Windows 10 UWP app. Legacy apps (SilverLight and Win8.1) are NOT accessible in Continuum mode.&nbsp; This also means your app package must be a universal package or have a mobile build (have an ARM build) in the package else you wouldn't be able to install it on your mobile device in the first place.&nbsp;For those of you who only want a mobile app and not target a desktop, be aware that your mobile app by default will run on Continuum's desktop. </span>To run well on the Continuum desktop, your&nbsp;<span style="font-family: Calibri; font-size: small;">app or game ideally should implement responsive design to function properly on the large external screen and the app needs to work in landscape orientation as portrait orientation is not supported on secondary screens.&nbsp;Landscape probably isn't a concern for&nbsp;most apps but there are some games out there built only for portrait screens.&nbsp;If your app must be portrait orientated, you may want to implement your own letterboxing in your app when you detect the window your app is displayed on is wider than it is tall (i.e. the continuum desktop). If you&rsquo;re traditionally a mobile app built for touch, know that the only input method of any secondary screen will be mouse and keyboard. Therefore, you&rsquo;ll want to make sure your app can work without touch, which might be something new for many traditional mobile developers.&nbsp; </span></p>
<p><span style="font-family: Calibri; font-size: small;">If supporting keyboard/mouse in your app is not doable, or just don&rsquo;t want your [mobile] app running in landscape or a larger screen&nbsp;off the phone, you will want to explicitly opt-out of Continuum and disable your mobile (ARM build) app from running in Continuum with the following extension in your app manifest:</span></p>
<p>&lt;Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="background-color: #ffff00;">xmlns:mobile="http://schemas.microsoft.com/appx/manifest/mobile/windows10"</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IgnorableNamespaces="uap mp mobile"&gt;</p>
<p>&nbsp;&nbsp;&lt;Applications&gt;<br />&nbsp;&nbsp;&nbsp; &lt;Application ...&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Extensions&gt;<br /><span style="background-color: #ffff00;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mobile:Extension Category="windows.mobileMultiScreenProperties"&gt;</span><br /><span style="background-color: #ffff00;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mobile:MobileMultiScreenProperties RestrictToInternalScreen="true"/&gt;</span><br /><span style="background-color: #ffff00;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/mobile:Extension&gt;</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Extensions&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/Application&gt;<br />&nbsp; &lt;/Applications&gt;</p>
<p><span style="font-family: Calibri; font-size: small;">In the future, if you want to have your app opt back in to Continuum, you can just change the RestrictToInternalScreen property to FALSE and your app will be allowed to run on Continuum for phone.</span><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<h2><span style="color: #2e74b5; font-family: Calibri Light; font-size: medium;">UI architecture considerations</span></h2>
<p><span style="font-family: Calibri; font-size: small;">Apps that have pages that implement responsive design techniques in theory shouldn't have to do anything else to run well on continuum for phone.&nbsp; Where developers might get themselves into a little trouble is if they heavily lean on </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/mt228350.aspx#tailored_layouts" target="_blank"><span style="color: #0000ff; font-family: Calibri; font-size: small;">tailored layouts that are device family specific implementations</span></a><span style="font-family: Calibri; font-size: small;"> (device family specific implementations of a page/control) for their UI.&nbsp; With tailored layouts, you&rsquo;ll want to make sure you explicitly test your app on a device with Continuum as your users may face some unintended UX experiences. The main &ldquo;gotcha&rdquo; that you should be aware of is that when running your application on Continuum for phone, despite it looking like a desktop, the </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.system.profile.analyticsversioninfo.devicefamily.aspx?cs-save-lang=1&amp;cs-lang=csharp#code-snippet-1" target="_blank"><span style="color: #0000ff; font-family: Calibri; font-size: small;">DeviceFamily</span></a><span style="font-family: Calibri; font-size: small;"> property is still &ldquo;Mobile&rdquo; and not &ldquo;Desktop&rdquo; as one might think.&nbsp; As a result, if you did implement tailored views and separated phone and desktop UX (i.e. MainPage.DeviceFamily-Desktop.xaml and MainPage.DeviceFamily-Mobile.xaml), know that your desktop optimized UI won&rsquo;t be seen by users running the app on the Continuum for phone desktop because it&rsquo;s not actually&nbsp;desktop device family.&nbsp;&nbsp;</span><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Calibri; font-size: small;">To overcome this, and minimize effort on your part to handle all screen sizes PLUS continuum for phone, here are several paths that you can take as a developer:</span></p>
<ol>
<li><span style="font-family: Calibri; font-size: small;">As a best practice, you ideally should stick with </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.adaptivetrigger.aspx" target="_blank"><span style="color: #0000ff; font-family: Calibri; font-size: small;">AdaptiveTrigger</span></a><span style="font-family: Calibri; font-size: small;"> through </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/mt228350.aspx#visual_states_and_state_triggers" target="_blank"><span style="color: #0000ff; font-family: Calibri; font-size: small;">visual states and the VisualStateManager</span></a><span style="font-family: Calibri; font-size: small;"> to handle different screen sizes as much as you possibly can over tailored layouts.&nbsp; You&rsquo;ll handle all screen sizes, no matter what device family, without redundant code going this route.</span></li>
<li><span style="font-family: Calibri; font-size: small;">If you must implement tailored layouts for your UX, do your best to replicate all or some or implement some kind your responsive design for larger screens from within your mobile specific page so that your mobile app running in continuum isn&rsquo;t a poor experience. One way you can tell if you&rsquo;re in continuum mode from a mobile device is if your screen resolution larger than 800x600 </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/dn958435.aspx#designing_with_effective_pixels"><span style="color: #0000ff; font-family: Calibri; font-size: small;">effective pixels</span></a><span style="font-family: Calibri; font-size: small;"> (EPX). Anything equal or less, assume it&rsquo;s on the phone screen.&nbsp; Another way you can know you&rsquo;re on continuum is by checking the </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.userinteractionmode.aspx" target="_blank"><span style="color: #0000ff; font-family: Calibri; font-size: small;">UserInteractionMode</span></a><span style="font-family: Calibri; font-size: small;">.&nbsp; On the&nbsp;phone it will be a value of &ldquo;Touch&rdquo; but on the desktop thru Continuum for phone it will be &ldquo;Mouse&rdquo;.&nbsp; Be careful with using this property as it can be either value on a desktop family depending on whether or not the user is in tablet-mode or not. So to definitively know your app window is running on Continuum for phone's desktop, you can check UserInteractionMode equals Mouse <span style="text-decoration: underline;">AND</span> Device-Family is equal to "Mobile". To assist with that, I've created a custom visual state trigger you can have in your solution that can check both and allow you to do UI customizations all in the&nbsp;XAML layer and through visual states</span><span style="font-family: Calibri; font-size: small;">. This can help you simplify your XAML and prevent you from having to check multiple values in code behind thus complicating your code. See below for sample implementation of such custom adapter. </span></li>
<li><span style="font-family: Calibri; font-size: small;">Instead of using the tailored view qualifier naming convention (i.e. [PageName].DeviceFamily-[FamilyName].xaml) you can handle displaying the appropriate page yourself. Prior to navigating to page, you can do an if/then on the screen size and then choose which page to show. You won&rsquo;t use the free convention built into UWP but this will give you complete control and let you have different UX for device families while not having to duplicate your desktop design to mobile just for Continuum. </span></li>
</ol>
<div style="padding-left: 30px;"><span style="font-family: Calibri; font-size: small;">&nbsp;&nbsp;&nbsp; // Detect if your mobile app window is executing on a secondary screen</span></div>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp; public class ContinuumMobileExecutingTrigger : StateTriggerBase<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public ContinuumMobileExecutingTrigger()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.UpdateTrigger();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private Page _target;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Page Target<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return _target;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(_target != value)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(_target != null)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _target.SizeChanged -= Page_SizeChanged;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _target = value;&nbsp;</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (_target != null)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _target.SizeChanged += Page_SizeChanged;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.UpdateTrigger();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private void Page_SizeChanged(object sender, SizeChangedEventArgs e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.UpdateTrigger();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;</p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void UpdateTrigger()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (UIViewSettings.GetForCurrentView().UserInteractionMode == UserInteractionMode.Mouse &amp;&amp; AnalyticsInfo.VersionInfo.DeviceFamily.Equals("Windows.Mobile", StringComparison.CurrentCultureIgnoreCase))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.SetActive(true);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.SetActive(false);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p style="padding-left: 30px;">}</p>
<div style="padding-left: 30px;">&lt;Page<br />&nbsp;&nbsp;&nbsp; x:Class="Continuum.MainPage"<br />&nbsp;&nbsp;&nbsp; xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br />&nbsp;&nbsp;&nbsp; xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br />&nbsp;&nbsp;&nbsp; xmlns:triggers="using:Continuum.Triggers"<br />&nbsp;&nbsp;&nbsp; xmlns:d="http://schemas.microsoft.com/expression/blend/2008"<br />&nbsp;&nbsp;&nbsp; xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"<br />&nbsp;&nbsp;&nbsp; mc:Ignorable="d"&gt;</div>
<div style="padding-left: 30px;">&nbsp;&nbsp;&nbsp; &lt;Grid x:Name="LayoutRoot" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;VisualStateManager.VisualStateGroups&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;VisualStateGroup x:Name="ContinuumExecutionStates"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;VisualState&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;VisualState.StateTriggers&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="background-color: #ffff00;">&lt;triggers:ContinuumMobileExecutingTrigger Target="{x:Bind}" /&gt;</span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/VisualState.StateTriggers&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;VisualState.Setters&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Setter Target="LayoutRoot.Background" Value="Red" /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/VisualState.Setters&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/VisualState&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/VisualStateGroup&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/VisualStateManager.VisualStateGroups&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/Grid&gt;<br />&lt;/Page&gt;</div>
<h2><span style="color: #2e74b5; font-family: Calibri Light; font-size: medium;">Considerations for enhancing your app experience when a second screen is available</span></h2>
<p><span style="font-family: Calibri; font-size: small;">With your phone having access to a second screen, or any other Windows device connected to more than one screen, you may want to consider extending your app experience and implement a second-screen experience via the </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.projectionmanager.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">ProjectionManager</span></a><span style="font-family: Calibri; font-size: small;"> API. Here are a few examples of what you can do with this capability:</span></p>
<ul>
<li>PowerPoint already leverages this to show slides on one screen but then presenter view/notes on the other</li>
<li><span style="font-family: Calibri; font-size: small;">You have a Fantasy Football app where your drafting on your phone while projecting the draft board on a big screen for all others in you draft party to see</span></li>
<li><span style="font-family: Calibri; font-size: small;">You&rsquo;re a DJ on your phone (or laptop/tablet) managing the playlist while at a party while displaying current song info or visualizations on a large connected screen</span></li>
<li><span style="font-family: Calibri; font-size: small;">You&rsquo;re playing a board game with friends, such as Scrabble, where your letters are shown on your phone and the game board is shown on the second screen. You could even leverage Bluetooth/WiFi direct APIs to enable other devices to connect to your device and play in your game and the projected game board and their own mobile device shows the letters they have.</span></li>
<li><span style="font-family: Calibri; font-size: small;">You can have a game and the main visuals are shown on a bigger connected screen and your phone then can be a controller and/or have an additional game experience simultaneously on the phone screen, like a map of where you are.</span></li>
</ul>
<p><span style="font-family: Calibri; font-size: small;">You can detect if your device is connected to a secondary screen through the </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.projectionmanager.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">ProjectionManager</span></a><span style="font-family: Calibri; font-size: small;"> API. This API will tell you if there is a connected second screen and if you can launch an additional window onto that screen to enable the second-screen experience in your app.&nbsp; You can use the same custom trigger displayed above to help optimize your UI based on where the window is executing and tailor the view accordingly for size and input. Or potentially use the same to limit or block content on the second screen such a media content that might have licensing restrictions on screen size, etc. </span></p>
<p><span style="font-family: Calibri; font-size: small;">If you do decide to leverage ProjectionManager in your application, be sure to read the </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/dn495078.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">guidelines for projection manager</span></a><span style="font-family: Calibri; font-size: small;">.</span></p>
<h2><span style="color: #2e74b5; font-family: Calibri Light; font-size: medium;">Other caveats and considerations for running on Continuum for phone or multiple-screens from a desktop family</span></h2>
<ul>
<li><span style="font-family: Calibri; font-size: small;">Continuum for phone only works on 1 additional screen. ProjectionManager APIs for desktop, however, can support more than 1 additional screen. </span></li>
<li><span style="font-family: Calibri; font-size: small;">You can't run two instances of the same app one on each screen. If you launch an app on the phone and then go to START and launch the same app on the secondary screen, the app instance from the phone will move to the second screen. But you can mimic multiple instances of your application by launching the same page in the </span><a href="https://msdn.microsoft.com/library/windows/apps/xaml/mt244352.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">additional window instances</span></a><span style="font-family: Calibri; font-size: small;"> your app can create. </span></li>
<li><span style="font-family: Calibri; font-size: small;">If your UWP implements multiple windows, you should know:</span>
<ul>
<li><span style="font-family: Calibri; font-size: small;">That your phone and also the secondary screen through Continuum for phone only support displaying one window on each screen</span></li>
<li><span style="font-family: Calibri; font-size: small;">There is no split view of apps (multi-tasking) on either screen right now and launching a second window from the app on either screen will be another full screen window in place of the previous window (you'll see each window independently in the app switcher and the taskbar however)</span></li>
<li><span style="font-family: Calibri; font-size: small;">And apps that implement multiple windows will only run be able to be viewed on the screen running the app window, if you want to have that window show up on the other screen, you'll need to launch the secondary window through the ProjectionManager API instead</span></li>
<li><span style="font-family: Calibri; font-size: small;">If your app or multiple window instances are running on the Continuum desktop, when you disconnect from that external screen, secondary windows will be immediately closed and the main window will automatically be suspended, but available for re-launch from the mobile device. Though users will explicitly need to relaunch the app on their phone. </span>
<ul>
<li><span style="font-family: Calibri; font-size: small;">As a developer, you'll need to carefully think through how your app experiences continues/resumes after users disconnect continuum</span></li>
<li><span style="font-family: Calibri; font-size: small;">You'll want to test your app to ensure the experience can continue when the user returns back to the app on their phone or reconnects to the external screen</span></li>
</ul>
</li>
<li><span style="font-family: Calibri; font-size: small;">Each screen (mobile device and secondary screen) have their own app switcher and don't see what's running on the other </span></li>
<li><span style="font-family: Calibri; font-size: small;">Your app can detect whether or not an external screen is connected to your mobile device by monitoring the ProjectionDisplayAvailableChanged event from the ProjectionManager class.&nbsp; Or you can use this custom trigger I created to allow you to adjust your UI when a screen is connected all in the XAML layer:</span></li>
</ul>
</li>
</ul>
<p style="padding-left: 30px;"><span style="font-family: Calibri; font-size: small;">&nbsp;&nbsp;&nbsp; //Detecting if your mobile app is connected to a secondary screen </span></p>
<p style="padding-left: 30px;">&nbsp;&nbsp;&nbsp; public class ContinuumMobileAvailableTrigger : StateTriggerBase<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public ContinuumMobileAvailableTrigger()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProjectionManager.ProjectionDisplayAvailableChanged += ProjectionManager_ProjectionDisplayAvailableChanged;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.UpdateTrigger();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private async void ProjectionManager_ProjectionDisplayAvailableChanged(object sender, object e)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.UpdateTrigger();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; private void UpdateTrigger()<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.SetActive(ProjectionManager.ProjectionDisplayAvailable &amp;&amp; AnalyticsInfo.VersionInfo.DeviceFamily.Equals("Windows.Mobile", StringComparison.CurrentCultureIgnoreCase));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }</p>
<h2><span style="color: #2e74b5; font-family: Calibri Light; font-size: medium;">Conclusion</span></h2>
<p><span style="font-family: Calibri; font-size: small;">This is about everything you need to know when developing experiences to take advantage of Continuum for mobile. If you have any feedback or questions, feel free to reach out to me via the comments section of this page. </span></p>
<h2><span style="color: #2e74b5; font-family: Calibri Light; font-size: medium;">Additional resources for Continuum for phone </span></h2>
<ul>
<li><a href="https://blogs.windows.com/buildingapps/2015/12/07/optimizing-apps-for-continuum-for-phone/"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Optimizing apps for Continuum for Phone</span></a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/windows/hardware/dn917883(v=vs.85).aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Continuum Overview</span></a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/windows/hardware/mt608594(v=vs.85).aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Continuum for Phone</span></a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/mt622742.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Show multiple views for an app</span></a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/windows/apps/dn434070.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Guidelines for multiple windows</span></a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/windows/apps/dn495078.aspx"><span style="color: #0000ff; font-family: Calibri; font-size: small;">Guidelines for projection manager</span></a></li>
<li><a href="http://www.windowscentral.com/16-keyboard-shortcuts-everyone-should-know-using-continuum-phones">16 shortcuts while using Continuum for Phone</a></li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Generating your tile/icon image assets for Windows 10 UWP using Photoshop Actions</title>
      <link>https://docs.microsoft.com/archive/blogs/madenwal/generating-your-tileicon-image-assets-for-windows-10-uwp-using-photoshop-actions</link>
      <pubDate>Tue, 24 Nov 2015 12:30:00 GMT</pubDate>
      <dc:creator><![CDATA[madenwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madenwal/2015/11/24/generating-your-tileicon-image-assets-for-windows-10-uwp-using-photoshop-actions/</guid>
      <description><![CDATA[UPDATE:  The Windows design team has made this template and the export actions into an official...]]></description>
      <content:encoded><![CDATA[<strong>UPDATE:  The Windows design team has made this template and the export actions into an official Windows 10 design resource. You can now find this at the <a href="https://msdn.microsoft.com/windows/uwp/design-downloads/index">Windows 10 design resources</a> page under the Tools section as well as here in this post.</strong>

---

<span style="font-family: Calibri;font-size: small">We all know that Windows 10 UWP now supports many different screen sizes and resolutions, from phones to laptops to big screen TVs. With all the different scale resolutions now supported, there is quite the massive amount of assets that your dev team or designers need to produce.</span><span style="font-family: Calibri;font-size: small">  </span><span style="font-family: Calibri;font-size: small">Your Windows UWP application, to make this less of a burden, only requires a small handful of those images assets be present in your app package. This is great as it allows you to get your app shipped quickly but it comes at the expense of a lot of screens potentially not showing the most optimal assets for that screen.</span><span style="font-family: Calibri;font-size: small">  </span><span style="font-family: Calibri;font-size: small">Kind of a problem. These assets represent your brand and your application and why would you want anything less than the sharpest images shown to your users? Creating all the required and recommended image assets for your Windows 10 UWP projects is a very time consuming and mundane process. And not to mention the ramp up time needed to understand (and to remember) all the </span><a href="https://msdn.microsoft.com/en-us/library/windows/apps/mt412102.aspx" target="_blank"><span style="color: #0563c1;font-family: Calibri;font-size: small">W10 guidelines for tile and icon assets</span></a><span style="font-family: Calibri;font-size: small"> put forth by the Windows team on how to ensure your app logo looks great on all screens. To help alleviate us all from this monotonous work, I decided to leverage Photoshop to streamline as much of this work as possible.</span>

<span style="font-family: Calibri;font-size: small">What I’ve done is taken the tile and icon assets guidelines documentation and used ALL that information to create a set of 7 Photoshop template files. These 7 files represent all the assets needed for your application’s tiles, app icons, splash screen, badge logo, and store logos. Along with these template files, there is a set of 7 Photoshop Actions (they are like macros) which pair up with each of the Photoshop PSD template files. What each of these Photoshop Actions do is take its corresponding template file exports that template multiple times to the proper sizes and with the proper file names needed for your UWP project.</span><span style="font-family: Calibri;font-size: small">   </span><span style="font-family: Calibri;font-size: small">These 7 templates/actions essentially output 68 of the required and recommended images assets for all the scale sizes (100, 125, 150, 200, 400) and package images needed to ensure your application looks great on any screen!</span>

<span style="font-family: Calibri;font-size: small">To get up and running with this, follow these instructions below:</span>
<ol>
	<li><strong>Download and unzip the ZIP file</strong> attached to this blog post (contains the 7 Photoshop templates and an ATN file that contains that Photoshop Action definitions).</li>
	<li><strong>Import</strong> the actions file (<strong>Windows UWP v1.2 for Windows.atn</strong> OR <strong>Windows UWP v1.2 for Mac.atn</strong>) in to your Photoshop instance through the Actions pane’s settings menu.
<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/7271.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/7271.2.png" alt="" border="0" /></a></li>
	<li><strong>Have your designer edit each of the Photoshop PSD template files</strong>. Each template file contains rulers representing all the boundaries which they should ideally adhere to (set forth by the <a href="https://msdn.microsoft.com/en-us/library/windows/apps/mt412102.aspx"><span style="color: #0563c1">W10 guidelines for tile and icon assets</span></a> document).  In pretty much all cases, it’s recommended that you <strong>keep your logo confined to the middle 4 boxes</strong>. However, if your logo is horizontally oriented, you can leverage the 2 square areas to the left and right of the center 4. Or if your logo is vertically oriented, you can leverage the 2 square areas above and below the center 4. Not both directions. And ideally leave your logo layer as a vector based layer so that as your asset is being re-sized and exported there is no loss of quality from the re-seize. <em>Note that these boxes created by the guide rulers are based on the tile and icons margin guidelines set by the W10 design team.</em>
<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/0181.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/0181.3.png" alt="" border="0" /></a>
Sticking to these boundaries will ensure your logo looks great everywhere within Windows. Unless you intend to have full bleed branding on your assets, which in that case you can ignore the rulers. Though I do recommend you carefully read the guidelines documentation for guidance on margins of your full bleed logos.</li>
	<li><strong>If you're using Photoshop on Windows, create a folder on your C: root drive called Images</strong> (i.e. C:\Images\).  This is the folder that the Photoshop Actions will output to.  <strong>If you're using Photoshop for Mac</strong>, files will be outputted to the <strong>/var/tmp/</strong> folder. That folder isn't visible in Finder (the file explorer) as it's hidden by default. So to navigate to it, you'll want to use Cmd+Shift+G and manually type the path.

<em>NOTE: I know this isn't ideal, but when creating Photoshop Actions, for both Windows and PC, the Action recorder captures the full path to any folder you choose. So if I chose Desktop, for example, it'd include the logged in user's name into the path which would prevent the action from running on other machines since that user (and it's full path to that person's Desktop) would exist or be accessible. Hence why I had to use C:\images or /var/tmp/ as they can both be accessible by all users on any computer.</em></li>
	<li><strong>For each Photoshop template file, run the corresponding Photoshop Action</strong> (i.e. Run the Logo-TileLargeMedium.psd action on the Logo-TileLargeMedium.psd template file).
<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/0250.5.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/0250.5.png" alt="" border="0" /></a></li>
	<li><strong>Copy</strong> the image files from the output folder to your <strong>Assets</strong> folder within your W10 application project.</li>
	<li>Decide if you want <a title="https://msdn.microsoft.com/en-us/library/windows/apps/mt412102.aspx?f=255&amp;MSPPError=-2147217396#target-based_assets" href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx/un-plated or plated images" target="_blank">un-plated or plated images</a> for your logo on the taskbar and task switcher and start menu jump list. If you want un-plated, simply include all the asset images named "<strong>Square44x44Logo.targetsize-##_altform-unplated.png</strong>" in your solution and ensure your tile background color is set to transparent. If you want them to be plated, then include the "<strong>Square44x44Logo.targetsize-##.png</strong>" image files and specify a hex value for tile color in the app manifest which dictates the background color for the tiles and icons. No need to include both sets.
<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/1067.7.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/1067.7.png" alt="" border="0" /></a></li>
	<li>Ensure each file you want is <strong>included</strong> in your Visual Studio project and set as <strong>Content</strong> so that it can be deployed with the application.</li>
	<li><strong>Update the Visual Assets tab in the application manifest</strong> to point to the appropriate image assets set.  If you type in the name of the file without the “.scale-###.” part of the file name, it’ll automatically figure out each scaled image available in the project and show up in the manifest designer. For example, instead of selecting each image one by one for each scale size, just type in Square71x71Logo.png and it'll populate the 100, 125, 150, 200, and 400 scale images. See image:
<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/0804.8.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/0804.8.png" alt="" border="0" /></a></li>
</ol>
<span style="font-family: Calibri;font-size: small"> </span>

<span style="font-family: Calibri;font-size: small">I use this for my own applications to and it now takes me minutes to produce all the assets I need instead of hours. Hopefully this helps you out as well. If you have any questions or suggestions, please do reach out via the comments below! </span>

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/65/64/58/Windows%20UWP%20v1.2.zip">Windows UWP v1.2.zip</a>]]></content:encoded>
    </item>
    <item>
      <title>Windows 10 UAP app throws System.Resources.MissingManifestResourceException error when accessing strings from a RESX</title>
      <link>https://docs.microsoft.com/archive/blogs/madenwal/windows-10-uap-app-throws-system-resources-missingmanifestresourceexception-error-when-accessing-strings-from-a-resx</link>
      <pubDate>Wed, 08 Apr 2015 11:42:00 GMT</pubDate>
      <dc:creator><![CDATA[madenwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madenwal/2015/04/08/windows-10-uap-app-throws-system-resources-missingmanifestresourceexception-error-when-accessing-strings-from-a-resx/</guid>
      <description><![CDATA[If you try to access a string from a RESX file embedded in your Windows 10 UWP application or...]]></description>
      <content:encoded><![CDATA[<p>If you try to access a string from a RESX file embedded in your Windows 10 UWP application or library in Visual Studio 2015, you'll end up getting this exception: <br /><br /></p>
<p><span style="font-family: Calibri; font-size: small;">System.Resources.MissingManifestResourceException was unhandled by user code<br /></span><span style="font-family: Calibri; font-size: small;">&nbsp; HResult=-2146233038<br /></span><span style="font-family: Calibri; font-size: small;">&nbsp; Message=Unable to load resources for resource file "Contoso.UI.GeneralStrings" in package "d1c46561-bf90-4e62-9e4f-e2c1f3fe0fd1".<br /></span><span style="font-family: Calibri; font-size: small;">&nbsp; Source=mscorlib<br /></span><span style="font-family: Calibri; font-size: small;">&nbsp; StackTrace:<br /></span><span style="font-family: Calibri; font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)<br /></span><span style="font-family: Calibri; font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at Contoso.UI.GeneralStrings.get_ApplicationName()<br /></span><span style="font-family: Calibri; font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at Contoso.UI.MainPage..ctor()<br /></span><span style="font-family: Calibri; font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at Contoso.UI.Contoso_UI_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage()<br /></span><span style="font-family: Calibri; font-size: small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at Contoso.UI.Contoso_UI_XamlTypeInfo.XamlUserType.ActivateInstance()</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">Turns out that you cannot take an existing RESX file and embed it inside your UWP 10 assembly.&nbsp; It comes down to the way the assembly gets compiled and this is no different than how it behaved in the Windows 8.1 days.&nbsp; If you have a need to use a RESX with your Windows 10 application, the workaround is to place your RESX files inside a Portable Class Library (PCL) and then have your UWP assemblies reference that PCL.&nbsp; This will get you around this limitation and allow you to still continue to use RESX instead of having to be forced to move to RESW. </span></p>]]></content:encoded>
    </item>
    <item>
      <title>How to create a hamburger menu control for Windows 8.1 and Windows Phone</title>
      <link>https://docs.microsoft.com/archive/blogs/madenwal/how-to-create-a-hamburger-menu-control-for-windows-8-1-and-windows-phone</link>
      <pubDate>Wed, 25 Mar 2015 21:43:00 GMT</pubDate>
      <dc:creator><![CDATA[madenwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madenwal/2015/03/25/how-to-create-a-hamburger-menu-control-for-windows-8-1-and-windows-phone/</guid>
      <description><![CDATA[You've probably seen many apps on iOS and Android that have a "hamburger menu" layout control for...]]></description>
      <content:encoded><![CDATA[<p>You've probably seen many apps on iOS and Android that have a "hamburger menu" layout control for their application.&nbsp; This unfortunately is not an out-of-box control on Windows or Windows Phone and instead requires you to create your own custom built&nbsp;control for this UI paradigm. I've seen several apps on Windows or Windows Phone implement this but&nbsp;they haven't always been done in a way that provides for maximum performance or sometimes lack the full interactions necessary to make the experience&nbsp;great. And most importantly,&nbsp;how it was built isn't always shared.&nbsp;My goal here is to help you implement the hamburger menu in your application without spending a great deal of time reinventing the wheel with creating something that can perform while ensuring it has all the appropriate UX interactions necessary to make&nbsp;it a&nbsp;great hamburger menu application. You'll find sample code attached to this post which you are free to manipulate to suit your needs. I plan on expanding this with a few different styles of hamburger menu I've seen and will post updates once I implement them. But for now, feel free to use this sample to help you get on your way, or even just to learn how a custom control is built.</p>
<p>A piece of advice if you plan on building your own.&nbsp; When it comes to performance, a common mistake I've seen when animating the left&nbsp;panel necessary for a hamburger menu is that devs will just animate on the width of the panel. The problem with this is that as the panel is being expanded or contracted, this will cause the pane to update its layout multiple times which is unnecessary.&nbsp; What you ideally want to just move the pane in or out of view without resizing it and causing any unneeded layout updates.&nbsp; The sample will show you how to do that using a CompositeTransform with the X value changing instead of the width of the pane.</p>
<p>If you have any questions on this control or building controls like this, feel free to post them in the comments section below.</p>
<p>Enjoy!</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/60/29/41/Microsoft.DX.HamburgerMenu.zip" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-60-29-41/Microsoft.DX.HamburgerMenu.zip">Microsoft.DX.HamburgerMenu.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>How to generate and manage app visual assets for Windows AND Windows Phone with ease using Photoshop actions</title>
      <link>https://docs.microsoft.com/archive/blogs/madenwal/how-to-generate-and-manage-app-visual-assets-for-windows-and-windows-phone-with-ease-using-photoshop-actions</link>
      <pubDate>Wed, 11 Feb 2015 14:41:00 GMT</pubDate>
      <dc:creator><![CDATA[madenwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madenwal/2015/02/11/how-to-generate-and-manage-app-visual-assets-for-windows-and-windows-phone-with-ease-using-photoshop-actions/</guid>
      <description><![CDATA[UPDATE:&nbsp; If you're looking for Photoshop templates for Windows 10, see my&nbsp; newer post:...]]></description>
      <content:encoded><![CDATA[<p><strong><em>UPDATE:&nbsp; </em></strong><em>If you're looking for Photoshop templates for</em><strong><em> Windows 10</em></strong><em>, </em><em>see my&nbsp; newer post: </em><em></em><strong><em><a href="http://blogs.msdn.com/b/madenwal/archive/2015/11/24/photoshop-templates-amp-actions-for-generating-image-assets-for-windows-10-uwp-applications.aspx">http://blogs.msdn.com/b/madenwal/archive/2015/11/24/photoshop-templates-amp-actions-for-generating-image-assets-for-windows-10-uwp-applications.aspx</a></em></strong></p>
<p>&nbsp;---</p>
<p>We all know that Windows and Windows Phone support many different screen resolutions. This requires dev teams to create many image assets in their app packages and we all know that takes&nbsp;a LOT of time to produce. To make things easier, the Store team only requires us to provide a small handful of the assets in the app packages. This is&nbsp;great as it&nbsp;allows you to get your app completed with less pain but it comes at the expense of a lot of screens not showing the most optimal asset really needed for that screen.&nbsp;Kind of a problem. These assets represent your brand and application but it's very painful and monotonous for your design team to produce the required images.&nbsp; This is where I've leveraged Photoshop to help us all&nbsp;out.&nbsp;</p>
<p>What I've done here is looked at all the image assets needed in Windows Phone 8/8.1 SilverLight <span style="text-decoration: underline;">and</span> Windows 8.1 Universal for Windows <span style="text-decoration: underline;">and</span> Windows Phone and created an inventory of those needed&nbsp;assets.&nbsp;This inventory&nbsp;lists&nbsp;each asset for each platform, the type of image it is (SmallLogo, Logo, StoreLogo, WideLogo, SplashScreen, BadgeLogo), and each of the sizes/scales needed for each image type for each platform.&nbsp; Then using the max sizes for each image type (and some to accommodate future larger screens), I created you a simple Photoshop PSD file representing each image type with a guide box within the template based on the design guidelines for the assets so you know exactly&nbsp;how large your logo/icons should be within that template.</p>
<p>Now&nbsp;this is where Photoshop really comes into play. If you're an experienced Photoshop user, you'll know that Photoshop has a feature called Actions (they are macros) and you can automate almost anything you want within Photoshop.&nbsp; I created an&nbsp;action for each image template (PSD file) which resizes the template to the appropriate size/scale and exports it with the appropriate file name for each platform.&nbsp; Once you run the actions on each template,&nbsp;the output folder will contain the Assets folder for each platform which you can then basically just drop into your solution.&nbsp; Output will be:</p>
<ul>
<li>22 image assets for UAP 8.1 Windows Phone</li>
<li>32 image assets for UAP 8.1 Windows</li>
<li>14 image assets for SilverLight Windows Phone</li>
</ul>
<p><span style="font-size: small;"><strong>In a nutshell, you just give your designers&nbsp;the 8 PSD template files, have them design it however they like, run the associated actions, and voil&agrave;, you'll have all the image assets you need without the designers needing to know what dimensions/names/margins/guidelines/etc for each file!</strong></span></p>
<p>&nbsp;</p>
<p>To get set up, follow the instructions below:</p>
<ol>
<li><strong>Download and unzip the ZIP file</strong> attached to this blog post <em>(the zip contains all the Photoshop templates, script to create the output folder, the exported Photoshop action scripts, readme file)</em>.</li>
<li><strong>Import</strong> each of the Action&nbsp;(*.atn)&nbsp;files&nbsp;found in the "<strong>Photoshop Actions</strong>" folder to your Photoshop instance.</li>
<li>Run the <strong>CreateOutputDirectories.cmd</strong> script to automatically create the output folder for all the assets (C:\Images\[PlatformNameHere]\Assets\)</li>
<li>Have your designers <strong>edit each of the Photoshop PSD files</strong> replacing the white guide boxes with the design you want.&nbsp;FYI,&nbsp;the white boxes are just a guide per the modern design guidelines for image assets&nbsp;from MSDN for each asset size.&nbsp;&nbsp;Also note that the layer name representing the white box indicates how many pixels that box is.&nbsp;But at the end of the day, you can do anything you want with you&nbsp;whole space and you don't have to follow the white boxes, but it is recommended that you do try to follow the image&nbsp;guidelines.&nbsp;Finally, if you need icons for your assets, see my previous post for a free collection of modern UI&nbsp;icons:&nbsp;<a title="Collection of modern UI icon libraries on the web for FREE" href="http://blogs.msdn.com/b/madenwal/archive/2015/02/09/collection-of-modern-ui-icon-libraries-on-the-web-for-free.aspx">http://blogs.msdn.com/b/madenwal/archive/2015/02/09/collection-of-modern-ui-icon-libraries-on-the-web-for-free.aspx</a></li>
<li>To generate all the&nbsp;images,<strong> run the action name corresponding to the name of the PSD file</strong> you want to export (i.e. run StoreLogo action on the StoreLogo.psd file).&nbsp;This will generate all the different scale sizes for that image for each platform.</li>
<li><strong>Copy</strong> the <strong>Assets</strong> folder from respective platform folder within <strong>C:\Images\</strong> to your solution.</li>
<li>Ensure each image file is <strong>included</strong> in your Visual Studio project and set as <strong>Content</strong> so that it can be deployed with the application.</li>
<li><strong>Update the Visual Assets tab in the application manifest</strong>&nbsp;to point to the appropriate image assets set.&nbsp;If you type in the name of the file without the "<strong>.scale-NNN.</strong>" part of the file name, it'll automatically figure out each scaled&nbsp;image&nbsp;available in the project. For example, instead of selecting each image one by one for each scale size, just type in Logo.png and it'll populate the 80 scale, 100 scale, 140 scale, and 180 scale&nbsp;images. See image:<br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/6560.Manifest.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-32/6560.Manifest.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/6560.Manifest.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-32/6560.Manifest.png" alt="" border="0" /></a></li>
</ol>
<p>&nbsp;</p>
<p>This took me a few days to inventory, build, test, and package up. Was painful and mind numbing to produce but I now use this in all my apps and it takes me just a minute to export all the assets I need.&nbsp; These templates are also ready for Windows 10, but I have not included the actions for those just yet as the platform has not been released yet.&nbsp; I'll have updated Actions for Windows 10 when the time comes. In the meantime, if you have any questions or suggestions, please do reach out to me via the comments below!</p>
<p>Enjoy!</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/59/28/79/Photoshop-Image-Asset-Actions-For-Windows8.1.zip" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-59-28-79/Photoshop_2D00_Image_2D00_Asset_2D00_Actions_2D00_For_2D00_Windows8.1.zip">Photoshop-Image-Asset-Actions-For-Windows8.1.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>How to embed a WebBrowser control inside a Pivot Item in Windows Phone</title>
      <link>https://docs.microsoft.com/archive/blogs/madenwal/how-to-embed-a-webbrowser-control-inside-a-pivot-item-in-windows-phone</link>
      <pubDate>Wed, 11 Feb 2015 13:06:00 GMT</pubDate>
      <dc:creator><![CDATA[madenwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madenwal/2015/02/11/how-to-embed-a-webbrowser-control-inside-a-pivot-item-in-windows-phone/</guid>
      <description><![CDATA[I had an application that required a WebBrowser control within one of the PivotItem instances in a...]]></description>
      <content:encoded><![CDATA[<p>I had an application that required a WebBrowser control within one of the PivotItem instances in a Pivot control.&nbsp; There is nothing stopping you from having the Content property of the PivotItem be a WebBrowser control instance except that when you run the application, the WebBrowser interferes with the touch / swiping controls of the Pivot control.&nbsp;</p>
<p>As you start swiping left or right, after you land on the PivotItem with the browser control, the browser instance will essentially &ldquo;take&ldquo; the swipes and not allow its parent (the PivotItem and the Pivot) to respond to them. This means that the user won't be able to swipe left/right&nbsp;if their swipe was&nbsp;in the&nbsp;pivot body. If they&nbsp;swipe within the header of the pivot control, then that'll&nbsp;work fine. This is because&nbsp;the web browser control instance sees those swipes and thinks you&rsquo;re trying to pan the content within the browser to the left or right and doesn't know anything about it's parent container.&nbsp; To fix this experience, you&rsquo;ll need to tap into the element tree of the WebBrowser and watch for swipes yourself and then manually change the SelectedIndex of the Pivot control accordingly.&nbsp; It sounds tricky but it isn&rsquo;t too bad. And I&rsquo;m also giving you a sample project which you can reference (it's attached to this blog post).</p>
<p>So to make this work, here&rsquo;s the 3 things you need to do:</p>
<p>&nbsp;</p>
<p><strong>1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;After the browser&rsquo;s Loaded event fires, get a handle to last Border element within the browser control.&nbsp; <a href="http://www.codeproject.com/Articles/63157/LINQ-to-Visual-Tree">LinqToVisualTree</a>&nbsp;will do the grunt work for you, so just reference that in your project.</strong></p>
<pre class="scroll"><code class="csharp">var border = _browser.Descendants&lt;Border&gt;().Last() as Border;</code></pre>
<p>&nbsp;</p>
<p><strong>2)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;After you get a handle to the border element, subscribe to its ManipulationDelta event.&nbsp;This event tells you when and how the user might have touched the element.</strong></p>
<p>&nbsp;</p>
<p><strong>3)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whenever the ManipulationDelta event fires, you&rsquo;ll need to look at the DeltaManipulation.Translation event argument and examine the X and Y values to see which direction the user might have swiped within the control.&nbsp; A positive X value means the user moved right, negative X value means they moved left. A positive Y value means they moved upwards, a negative Y value means they moved downwards. But you need to be careful here. Just because you see a change in the X value doesn&rsquo;t mean the user swiped left or right.&nbsp; They very well could have been swiping up/down to pan vertically in the web browser and but they didn&rsquo;t move their finger in a perfecty straight vertical line.&nbsp; No one will ever do that. So you need to be a little smart here with the logic and try to figure out if they absolutely are trying to swipe left or right to move to another pivot.&nbsp; The way I did it is to compare the X to the Y values and then add in some buffer by checking to see if the X delta movement is at least 5 times greater than the Y delta.&nbsp;If it is, then its almost certain the user is trying to move pivots. If it&rsquo;s less than that, well then perhaps they were actually trying to pan vertically but they were holding the phone in such a way that their swipes were diagonal across the screen.&nbsp; You&rsquo;ll need to determine what the right threshold is for your app but hopefully should be easy to do with this sample:</strong></p>
<pre class="scroll"><code class="csharp"> var x = e.DeltaManipulation.Translation.X;<br /> var y = e.DeltaManipulation.Translation.Y; <br /> // Make the deltas positive numbers for calculating the threshold<br /> var xAb = Math.Abs(x);<br /> var yAb = Math.Abs(y);<br /> <br /> // Ensure that the horizontal scroll is greater than the vertical scroll amount. <br /> // In case the user swipes diagonally, ensure that the horizontal scroll is at least 5x bigger than the vertical<br /> // scroll to eliminate any accidental pivot changes.<br /> if (xAb &gt; (5 * yAb))<br /> {<br /> if (x &lt; y)<br /> {<br /> // Go right<br /> e.Handled = true;<br /> _pivot.SelectedIndex = Math.Min(_pivot.Items.Count - 1, _pivot.SelectedIndex + 1);<br /> }<br /> else if (x &gt; y)<br /> {<br /> // Go left<br /> e.Handled = true;<br /> _pivot.SelectedIndex = Math.Max(0, _pivot.SelectedIndex - 1);<br /> }<br /> }<br /> </code></pre>
<p>One thing to note is that this only really will work for you if the content you are displaying in the WebBrowser control doesn&rsquo;t need to pan horizontally.&nbsp; If you need to support that, well then you have a big design issue on your page that you need to address regarding multiple controls needing to support swiping horizontally. &nbsp;And if you&rsquo;re going to be reusing this logic across multiple Pivot control instances, see the sample project where I&rsquo;ve taken the above and wrapped it into a helper class making reuse a little easier.</p>
<p>Good luck!</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/59/28/50/PivotWithWebBrowserSample.zip" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-59-28-50/PivotWithWebBrowserSample.zip">PivotWithWebBrowserSample.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Collection of modern UI icon libraries on the web for FREE</title>
      <link>https://docs.microsoft.com/archive/blogs/madenwal/collection-of-modern-ui-icon-libraries-on-the-web-for-free</link>
      <pubDate>Mon, 09 Feb 2015 18:39:00 GMT</pubDate>
      <dc:creator><![CDATA[madenwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madenwal/2015/02/09/collection-of-modern-ui-icon-libraries-on-the-web-for-free/</guid>
      <description><![CDATA[If you&rsquo;re not a natural designer, like myself, it can be really tough to put together a...]]></description>
      <content:encoded><![CDATA[<p>If you&rsquo;re not a natural designer, like myself, it can be really tough to put together a beautiful modern UI. Or maybe you are a good designer but just don&rsquo;t want to reinvent the wheel and are looking for a collection of existing modern icons / graphics. Well, I found the following resources to be a great asset to putting together a sharp UI in my applications. The first URL usually solves my needs. Highly recommended.</p>
<p>&nbsp;</p>
<ul>
<li><span style="font-size: medium;"><strong><a href="http://modernuiicons.com/">http://modernuiicons.com/</a></strong></span><br />By Austin Andrews designed for Windows and Windows Phone applications. He will<br />also take requests and build custom icons for you. Probably the best collection<br />of modern icons ready for immediate consumption.</li>
<li><span style="font-size: medium;"><strong><a href="http://modernuiicons.com/">http://www.flaticon.com</a></strong></span><br />Hundreds of collections of icons by purpose for free. Also has a Photoshop plugin to allow you to find icons without even leaving Photoshop.</li>
<li><span style="font-size: medium;"><strong><a href="http://www.syncfusion.com/downloads/metrostudio">http://www.syncfusion.com/downloads/metrostudio</a></strong></span><br />Syncfusion Metro Studio is a collection of over 4,000 Metro-style icon<br />templates that can be easily customized to create thousands of unique Metro<br />icons.</li>
<li><span style="font-size: medium;"><strong><a href="http://www.geekchamp.com/icon-explorer/introduction">http://www.geekchamp.com/icon-explorer/introduction</a></strong></span><br />Over 1500 free symbols/icons over 29 categories and can be used as PNG or via XAML/HTML<br />code.</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Other sources but may or may not need some light&nbsp;tweaking to be a<br />modern icon
<ul>
<li><span style="font-size: medium;"><strong><a href="http://sixrevisions.com/freebies/icons/free-icons-1000/">http://sixrevisions.com/freebies/icons/free-icons-1000/</a></strong></span></li>
<li><span style="font-size: medium;"><strong><a href="http://www.freepik.com/">http://www.freepik.com/</a></strong></span></li>
<li><span style="font-size: medium;"><strong><a href="http://materialdesignicons.com/">http://materialdesignicons.com/</a></strong></span><br />Also created by Austin Andrews but for Google&rsquo;s material design language. You<br />can always tweak these to be modern UI icons.</li>
<li><span style="font-size: medium;"><strong><a href="https://github.com/google/material-design-icons/releases">https://github.com/google/material-design-icons/releases</a></strong></span><br />Library released by Google but could also be tweaked for your modern app if you<br />like.</li>
</ul>
</li>
</ul>
<p>&nbsp;</p>
<p>If you have any others you find, please do share and I'll append to this collection!</p>]]></content:encoded>
    </item>
    <item>
      <title>How to link style/resource dictionaries located in different assemblies in WinRT and SilverLight</title>
      <link>https://docs.microsoft.com/archive/blogs/madenwal/how-to-link-styleresource-dictionaries-located-in-different-assemblies-in-winrt-and-silverlight</link>
      <pubDate>Mon, 09 Feb 2015 17:08:00 GMT</pubDate>
      <dc:creator><![CDATA[madenwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madenwal/2015/02/09/how-to-link-styleresource-dictionaries-located-in-different-assemblies-in-winrt-and-silverlight/</guid>
      <description><![CDATA[If you're architecting a modern application for Windows or Windows Phone for reuse or even for...]]></description>
      <content:encoded><![CDATA[<p>If you're architecting a modern application for Windows or Windows Phone for reuse or even for performance, you'll quickly realize that putting everything in to the main application project isn't the wisest of ideas.&nbsp; When you start separating your views/controls into modules (separate projects), you'll need to move your common styles into a separate resource file which can be referenced by and shared by all the various libraries you create instead of in the global App.xaml file. If you don't, your application will actually still execute, but you won't be able to see any of your custom styles in the designer view.&nbsp; So you create yourself the resource file in your common assembly but then how do you reference/link that resource file to your App.xaml file?&nbsp; I personally haven't been able to figure out how to do this in Blend so I just do it by hand.</p>
<p>If your solution is a WinRT solution, you&rsquo;ll need to follow this convention:</p>
<p><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;">ms-appx:///{ASSEMBLY_NAME}/{RESOURCE_FILE_PATH}<br /></span></span></span><span style="color: #000000;">i.e.</span>&nbsp;ms-appx:///Contoso.Core/Resources/CoreStyles.xaml</span></span></span><br /></span></span></span></p>
<p>For a SilverLight Windows Phone solution, you&rsquo;ll need to follow this convention:</p>
<p><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;">/{ASSEMBLY_NAME};component/{RESOURCE_FILE_PATH}<br /></span></span></span></span></span></span><span style="color: #000000;">i.e.</span>&nbsp;/Contoso.Core;component/Resources/CoreStyles.xaml</span></span></span></span></span></span></p>
<p>&nbsp;</p>
<p>Full samples of the App.xaml file as follows:</p>
<h3>WinRT</h3>
<p>&nbsp;</p>
<pre class="scroll"><code class="html">&lt;Application<br /> x:Class="Contoso.UI.App"<br /> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br /> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;<br /> <br /> &lt;!--Application Resources--&gt;<br /> &lt;Application.Resources&gt;<br /> &lt;ResourceDictionary&gt;<br /> &lt;ResourceDictionary.MergedDictionaries&gt;<br /> &lt;ResourceDictionary Source="ms-appx:///Contoso.Core/Resources/CoreStyles.xaml" /&gt;<br /> &lt;ResourceDictionary Source="ms-appx:///Contoso.UI.Core/Resources/UICoreStyles.xaml" /&gt;<br /> &lt;/ResourceDictionary.MergedDictionaries&gt;<br /> <br /> &lt;!-- Other style definitions can still go here --&gt;<br /> &lt;Style TargetType="Button"&gt;<br /> &lt;/Style&gt;<br /> <br /> &lt;/ResourceDictionary&gt;<br /> &lt;/Application.Resources&gt;<br /> &lt;/Application&gt;<br /> <br /> </code></pre>
<h3>SilverLight</h3>
<pre class="scroll"><code class="html">&lt;Application<br /> x:Class="Contoso.UI.App"<br /> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br /> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br /> xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"<br /> xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"&gt;<br /> <br /> &lt;!--Application Resources--&gt;<br /> &lt;Application.Resources&gt;<br /> &lt;ResourceDictionary&gt;<br /> &lt;ResourceDictionary.MergedDictionaries&gt;<br /> &lt;ResourceDictionary Source="/Contoso.Core;component/Resources/CoreStyles.xaml"/&gt;<br /> &lt;ResourceDictionary Source="/Contoso.UI.Core;component/Resources/UICoreStyles.xaml"/&gt;<br /> &lt;/ResourceDictionary.MergedDictionaries&gt;<br /> <br /> &lt;!-- Other style definitions can still go here --&gt;<br /> &lt;Style TargetType="Button"&gt;<br /> &lt;/Style&gt;<br /> <br /> &lt;/ResourceDictionary&gt;<br /> &lt;/Application.Resources&gt; <br /> <br /> &lt;Application.ApplicationLifetimeObjects&gt;<br /> &lt;!--Required object that handles lifetime events for the application--&gt;<br /> &lt;shell:PhoneApplicationService<br /> Launching="Application_Launching" Closing="Application_Closing"<br /> Activated="Application_Activated" Deactivated="Application_Deactivated"/&gt;<br /> &lt;/Application.ApplicationLifetimeObjects&gt;<br /> <br /> &lt;/Application&gt;<br /> </code></pre>]]></content:encoded>
    </item>
    <item>
      <title>Windows 8.1 WACK Failure: The contrast ratio of the background color and foreground text color is 1. This ratio should be greater than or equal to 1.5</title>
      <link>https://docs.microsoft.com/archive/blogs/madenwal/windows-8-1-wack-failure-the-contrast-ratio-of-the-background-color-and-foreground-text-color-is-1-this-ratio-should-be-greater-than-or-equal-to-1-5</link>
      <pubDate>Mon, 26 Jan 2015 15:47:00 GMT</pubDate>
      <dc:creator><![CDATA[madenwal]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/madenwal/2015/01/26/windows-8-1-wack-failure-the-contrast-ratio-of-the-background-color-and-foreground-text-color-is-1-this-ratio-should-be-greater-than-or-equal-to-1-5/</guid>
      <description><![CDATA[I was trying to submit a new application of mine to the Windows 8 Store and I failed a package...]]></description>
      <content:encoded><![CDATA[<p>I was trying to submit a new application of mine to the Windows 8 Store and I failed a package compliance test which stated:</p>
<div class="titleItem"><span style="font-size: medium;"><strong>Package compliance test</strong></span></div>
<div>
<div class="testresults"><strong style="color: red;">FAILED</strong>
<div style="line-height: 18pt;">App manifest</div>
<ul style="margin: 0px 0px 0px 120pt; list-style-type: disc;">
<li>
<div><span><span class="messageHeading"><strong>Error Found</strong>: </span>The app manifest test detected the following errors:</span>
<ul class="ulMessagesNoOverflow">
<li><span style="background-color: #c0c0c0;">The contrast ratio of the background color and foreground text color is 1. This ratio should be greater than or equal to 1.5.</span></li>
</ul>
</div>
</li>
<li>
<div><span><span class="messageHeading"><strong>Impact if not fixed</strong>: </span>Apps that violate the Windows Store certification requirements can&rsquo;t be submitted to the Windows Store.</span></div>
</li>
<li>
<div><span><span class="messageHeading"><strong>How to fix</strong>: </span>App manifest must include valid entries for all required fields, please modify the manifest entries listed above.</span></div>
</li>
</ul>
</div>
</div>
<p>&nbsp;</p>
<p>What created this issue or failure is that I wanted the application's background to be pure white including the splash screen and tile background colors. But what I forgot to do is flip the <strong>Foreground&nbsp;text</strong>&nbsp;property within the <strong>Package.appxmanifest</strong> to <strong>Dark</strong> (default is Light).&nbsp; As a result, when the WACK test was run, it's static analysis kicked in thinking I was trying to submit a white on white application and complained about contrast within the app.&nbsp;If you come across this error, just make sure you go into the manifest and double check the following property:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/7608.Manifest.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-32/7608.Manifest.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/61/32/7608.Manifest.png" original-url="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-61-32/7608.Manifest.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>