<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Development from the Field</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/jfox/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/jfox/feed.xml</link>
    <description>Covering real-world development scenarios that I experience in the field.</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:41:26 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Helpful resources for developing Windows Store apps</title>
      <link>https://docs.microsoft.com/archive/blogs/jfox/helpful-resources-for-developing-windows-store-apps</link>
      <pubDate>Thu, 15 Nov 2012 09:31:00 GMT</pubDate>
      <dc:creator><![CDATA[Jason Fox - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jfox/2012/11/15/helpful-resources-for-developing-windows-store-apps/</guid>
      <description><![CDATA[Here are links to some of the resources that I find most useful for developing Windows Store apps....]]></description>
      <content:encoded><![CDATA[<p>Here are links to some of the resources that I find most useful for developing Windows Store apps. I&rsquo;ll update this post as I come up with more, but this should get you started.</p>
<ul>
<li>End-to-end apps <a title="https://msdn.microsoft.com/en-us/library/windows/apps/br211375.aspx" href="https://msdn.microsoft.com/en-us/library/windows/apps/br211375.aspx">https://msdn.microsoft.com/en-us/library/windows/apps/br211375.aspx</a></li>
<li>Performance best practices for XAML apps <a title="https://msdn.microsoft.com/en-us/library/windows/apps/hh750313.aspx" href="https://msdn.microsoft.com/en-us/library/windows/apps/hh750313.aspx">https://msdn.microsoft.com/en-us/library/windows/apps/hh750313.aspx</a></li>
<li>Windows RT white paper download <a title="https://www.microsoft.com/en-us/download/details.aspx?id=30703" href="https://www.microsoft.com/en-us/download/details.aspx?id=30703">https://www.microsoft.com/en-us/download/details.aspx?id=30703</a></li>
<li>Developing secure apps <a title="https://msdn.microsoft.com/en-us/library/windows/apps/hh849625.aspx" href="https://msdn.microsoft.com/en-us/library/windows/apps/hh849625.aspx">https://msdn.microsoft.com/en-us/library/windows/apps/hh849625.aspx</a></li>
<li>Working with tiles, badges and toast notifications <a title="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh868259(v=win.10).aspx" href="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh868259(v=win.10).aspx">https://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh868259(v=win.10).aspx</a></li>
<li>Accessing data and files <a title="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh758319(v=win.10).aspx" href="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh758319(v=win.10).aspx">https://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh758319(v=win.10).aspx</a></li>
<li>Adding ListView and GridView controls <a href="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh780618.aspx">https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh780618.aspx</a> - also has links to the default styles and control templates for all the controls involved.</li>
</ul>
<p>Also feel free to post links in the comments below.</p>]]></content:encoded>
    </item>
    <item>
      <title>Come see me at Tulsa TechFest 2012</title>
      <link>https://docs.microsoft.com/archive/blogs/jfox/come-see-me-at-tulsa-techfest-2012</link>
      <pubDate>Tue, 09 Oct 2012 11:22:22 GMT</pubDate>
      <dc:creator><![CDATA[Jason Fox - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jfox/2012/10/09/come-see-me-at-tulsa-techfest-2012/</guid>
      <description><![CDATA[I will be giving a talk on Friday, October 12th at 1:30 PM centered around how you can make your...]]></description>
      <content:encoded><![CDATA[<p>I will be giving a talk on Friday, October 12th at 1:30 PM centered around how you can make your Windows 8 app better. </p>  <p>Details <a href="https://techfests.com/Tulsa/2012/Speakers/JasonFox/default.aspx" target="_blank">here</a>.</p>  <p>Registration <a href="https://techfests.com/Tulsa/2012/Register/default.aspx" target="_blank">here</a>.</p>  <p>Hope to see you there!</p>]]></content:encoded>
    </item>
    <item>
      <title>Tips &amp; Tricks: AppBar Buttons in XAML</title>
      <link>https://docs.microsoft.com/archive/blogs/jfox/tips-tricks-appbar-buttons-in-xaml</link>
      <pubDate>Thu, 04 Oct 2012 12:58:00 GMT</pubDate>
      <dc:creator><![CDATA[Jason Fox - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jfox/2012/10/04/tips-tricks-appbar-buttons-in-xaml/</guid>
      <description><![CDATA[I have come across several developers that have asked how they get all those nice icons for the...]]></description>
      <content:encoded><![CDATA[<p>I have come across several developers that have asked how they get all those nice icons for the AppBar buttons.</p>
<h4>For XAML</h4>
<p>If you&rsquo;re building your app using XAML, then the best way is to peruse the <em>StandardStyles.xaml</em> resource dictionary, found in the Common directory, to see if you can find one of the already defined buttons that fit your needs. Simple look through and find the style that will work for you and uncomment that section of XAML. Then, you can assign that style to your Button&rsquo;s Style property using the <span style="color: #0000ff; background-color: #ffffff;" color="#0000ff">&ldquo;{<span style="color: #d16349;" color="#d16349">StaticResource</span> &lt;style name&gt;}&rdquo;</span> binding.</p>
<p>&nbsp;</p>
<p>Example of a play button.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/5355.image_0DC6663F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/5355.image_5F00_0DC6663F.png"><img width="1162" height="390" title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/1122.image_thumb_3DA10800.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/1122.image_5F00_thumb_5F00_3DA10800.png" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/7180.image_1AFCC985.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/7180.image_5F00_1AFCC985.png"><img width="863" height="44" title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/6320.image_thumb_56502F43.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/6320.image_5F00_thumb_5F00_56502F43.png" border="0" /></a></p>
<p>&nbsp;</p>
<h4>Overriding the text displayed</h4>
<p>After you do this, you may notice that you can&rsquo;t set the name that displays below the icon image.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/1220.image_5577C959.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/1220.image_5F00_5577C959.png"><img width="77" height="83" title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/6318.image_thumb_2E3D8024.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/6318.image_5F00_thumb_5F00_2E3D8024.png" border="0" /></a></p>
<p>Actually you can. If you look at the <em>AppBarButtonStyle</em> definition, then you&rsquo;ll notice that the <strong>TextBlock</strong> that contains that text is bound to <strong>AutomationPropertites.Name</strong>. So, simply override that attached property on your button like this.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/0121.image_34F089A7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/0121.image_5F00_34F089A7.png"><img width="1167" height="34" title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/1602.image_thumb_58A9B141.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/1602.image_5F00_thumb_5F00_58A9B141.png" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/1205.image_180764D2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/1205.image_5F00_180764D2.png"><img width="78" height="82" title="image" style="background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/4331.image_thumb_1EBA6E55.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/4331.image_5F00_thumb_5F00_1EBA6E55.png" border="0" /></a></p>
<p>&nbsp;</p>
<p>If anyone has any tips for WinJS developers, please let me know in the comments. Happy to share a link with the community.</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows 8: IsConnectedToInternet?</title>
      <link>https://docs.microsoft.com/archive/blogs/jfox/windows-8-isconnectedtointernet</link>
      <pubDate>Mon, 10 Sep 2012 14:44:00 GMT</pubDate>
      <dc:creator><![CDATA[Jason Fox - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jfox/2012/09/10/windows-8-isconnectedtointernet/</guid>
      <description><![CDATA[In writing my own app, I found myself wondering, “how to I detect if the machine is actually...]]></description>
      <content:encoded><![CDATA[<p>In writing my own app, I found myself wondering, “how to I detect if the machine is actually connected to the internet before I start making all manner of web services calls?”. Well, below is my solution written in C#. Enjoy!</p>  <p>&#160;</p>  <h4>Code:</h4>  <blockquote>   <pre class="csharpcode"><span class="kwrd">private</span> <span class="kwrd">bool</span> IsConnectedToInternet()
{
    <span class="kwrd">bool</span> connected = <span class="kwrd">false</span>;

    ConnectionProfile cp = NetworkInformation.GetInternetConnectionProfile();

    <span class="kwrd">if</span> (cp != <span class="kwrd">null</span>)
    {
        NetworkConnectivityLevel cl = cp.GetNetworkConnectivityLevel();

        connected = cl == NetworkConnectivityLevel.InternetAccess;
    }

    <span class="kwrd">return</span> connected;
}</pre>
</blockquote>


<p>&#160;</p>

<h4>Usage:</h4>

<blockquote>
  <pre class="csharpcode"><span class="kwrd">if</span>(!IsConnectedToInternet())
{
     <span class="rem">//some kind of error handling here</span>
}
<span class="kwrd">else</span>
{
     <span class="rem">//we're good to go, so do something with it!</span>
}</pre>
</blockquote>


<p>If you find a better way of doing it, please let me know in the comments. </p>]]></content:encoded>
    </item>
    <item>
      <title>Windows 8: Should I still develop for desktop?</title>
      <link>https://docs.microsoft.com/archive/blogs/jfox/windows-8-should-i-still-develop-for-desktop</link>
      <pubDate>Wed, 22 Aug 2012 08:35:00 GMT</pubDate>
      <dc:creator><![CDATA[Jason Fox - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jfox/2012/08/22/windows-8-should-i-still-develop-for-desktop/</guid>
      <description><![CDATA[Absolutely!   I had a question from a friend a few months ago about the Windows 8 Modern UI...]]></description>
      <content:encoded><![CDATA[<p><strong><font size="4">Absolutely!</font></strong> </p>  <p>I had a question from a friend a few months ago about the Windows 8 Modern UI replacing WPF and if he should still invest in training for desktop development. I understand where the concern is coming from – WinRT is the new shiny kid on the block and there is a fear of irrelevancy. Stave off your fear, my friends! Desktop is here to stay for the foreseeable future and polishing up the ole WPF skills is never a bad thing. There will be demand for that skillset for years to come as companies still have to build robust desktop apps that just don’t fit into the Modern UI scenario. </p>  <p>There will be codebases that need maintenance, new features to add and just outright new projects that will require desktop development skills like WPF. </p>  <p>Having said that, there is no reason a developer can’t develop for both desktop and Windows Store. Is there? Take those awesome XAML/C#/VB skills and put them to use in an app and make some money! </p>]]></content:encoded>
    </item>
    <item>
      <title>Windows 8: Leveraging the CredentialPicker</title>
      <link>https://docs.microsoft.com/archive/blogs/jfox/windows-8-leveraging-the-credentialpicker</link>
      <pubDate>Thu, 05 Jul 2012 17:02:00 GMT</pubDate>
      <dc:creator><![CDATA[Jason Fox - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/jfox/2012/07/05/windows-8-leveraging-the-credentialpicker/</guid>
      <description><![CDATA[Credentials are important
In modern apps, collecting and storing user credentials has become very...]]></description>
      <content:encoded><![CDATA[<h4>Credentials are important</h4>
<p>In modern apps, collecting and storing user credentials has become very prevalent. Especially, if your app is leveraging a service or other type of secure resource that requires the user to provide a login. Providing a good, clean and consistent credential experience is very important, in that it gives the user the feeling that you are handling their credentials with the care and security that they deserve. So, in this topic, I will discuss how to implement credential collection using the CredentialPicker API in your Window 8 app.</p>
<h4>Collecting user credentials</h4>
<p>In the past, on desktop applications and web pages, collecting user credentials was a mixed bag of user experiences. Some developers used the APIs provided in Windows and some rolled their own dialogs for collecting this information. Since one of the core concepts of Windows 8 development is to provide users with a clean, consistent user experience across applications and devices, it would make sense to extend this principle to credentials.</p>
<p>This brings up the <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.security.credentials.ui.credentialpicker.aspx">CredentialPicker</a> class. This class provides a configurable async dialog that can be used to collect credentials from the user and return them via a <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.security.credentials.ui.credentialpickerresults.aspx">CredentialPickerResults</a> object. Once the user has entered the credentials, you can use this object to pass credentials on to your authentication process and then storage, provided the user has opted to save them.</p>
<p>Figure 1: The CredentialPicker UI dialog in action.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/1614.CredentialPicker_31608EAB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/1614.CredentialPicker_5F00_31608EAB.png"><img width="644" height="364" title="CredentialPicker" style="display: inline; background-image: none;" alt="CredentialPicker" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/52/71/metablogapi/6318.CredentialPicker_thumb_77714BBE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-52-71-metablogapi/6318.CredentialPicker_5F00_thumb_5F00_77714BBE.png" border="0" /></a></p>
<h5>Here is the code I used for the above screenshot:</h5>
<pre class="csharpcode">            CredentialPickerOptions options = <span class="kwrd">new</span> CredentialPickerOptions()
            {
                AuthenticationProtocol = AuthenticationProtocol.Basic,
                CredentialSaveOption = Windows.Security.Credentials.UI.CredentialSaveOption.Selected,
                CallerSavesCredential = <span class="kwrd">true</span>,
                Caption = <span class="str">"Basic Login"</span>,
                Message = <span class="str">"Please enter your credentials"</span>,
                TargetName = <span class="str">"."</span>
            };

            CredentialPickerResults results = await CredentialPicker.PickAsync(options);

            <span class="kwrd">string</span> username = results.CredentialUserName;
            <span class="kwrd">string</span> password = results.CredentialPassword;

            <span class="rem">// do something here to check that the credentials work</span>
            <span class="kwrd">bool</span> loginResult = Login(username, password);</pre>
<p>&nbsp;</p>
<p></p>
<p>As you can see, the CredentialPicker API is a very simple way to collect user credentials using a consistent, asynchronous API.</p>
<h4>Test the credentials</h4>
<p>The next step is very important, but I won&rsquo;t go in to any detail here. Once the CredentialPicker returns, be sure to validate the credentials before proceeding. If the validation fails, then alert the user gracefully with meaningful, inline errors. Don&rsquo;t ruin the great login experience you&rsquo;re creating by mishandling this very important step.</p>
<h4>Store the credentials</h4>
<p>If the user chose to have you save their credentials, then you&rsquo;ll want to store the user name and password somewhere in order to leverage them. Luckily, the WinRT APIs contain a class that will help you with this task. Instead of storing this information in a text file or XML file, go ahead and leverage the <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.security.credentials.passwordvault.aspx" target="_blank">PasswordVault</a> class in order to store the credentials in the Windows Credential Manager.</p>
<p>Not only does it save you a little bit of coding, but it provides a safe, consistent way to store credentials and retrieve them later. It also has the bonus of being able to sync credentials across devices to the same Windows Live ID. This means that a user can login on one device and then, through the magic of syncing, there are automatically logged in on any other device running Windows 8.</p>]]></content:encoded>
    </item>
  </channel>
</rss>