<?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>Design and Implement Windows 8 Metro Style Applications</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/metroapps/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/metroapps/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:23:30 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Implementing a Singleton Class The Right way</title>
      <link>https://docs.microsoft.com/archive/blogs/metroapps/implementing-a-singleton-class-the-right-way</link>
      <pubDate>Sat, 20 Apr 2013 08:13:51 GMT</pubDate>
      <dc:creator><![CDATA[Mahmoud Medhat Moussa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/metroapps/2013/04/20/implementing-a-singleton-class-the-right-way/</guid>
      <description><![CDATA[I was in Teched Africa Last week and during my session one of the Audience "Carl...]]></description>
      <content:encoded><![CDATA[<p>I was in Teched Africa Last week and during my session one of the Audience "Carl M&ouml;nnig"&nbsp;shared a&nbsp;nice feedback about the way I was Implementing Singleton Class so&nbsp;Decided to Share it with everyone for future usage</p>
<p>&nbsp;</p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">I did not like the singleton pattern you used in the Win8 LOB In Depth talk&hellip;&nbsp; It looked something like this:</span></span></p>
<p>&nbsp;</p>
<p><strong>public</strong> class MySingleton<strong>()</strong></p>
<p><strong>{</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>private</strong> MySingleton<strong>()</strong> <strong>{}</strong> //Private cstr</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>private</strong> static MySingleton _instance<strong>;</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>public</strong> static MySingleton Instance <strong>{</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get <strong>{</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>if</strong> <strong>(</strong>_instance <strong>==</strong> <strong>null</strong><strong>)</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _instance <strong>=</strong> <strong>new</strong> MySingleton<strong>()</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>return</strong> _instance<strong>;</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>}};</strong></p>
<p><strong>}</strong></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">This is too much code and it is not thread-safe when multiple threads call </span>MySingleton.Instance<span style="font-size: small;"><span style="font-family: Calibri;"> at the same time.&nbsp; You need to add double-check locking to make it thread-safe.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Cleaner option:</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p><strong>public</strong> class MySingleton<strong>()</strong></p>
<p><strong>{</strong></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>private</strong> MySingleton<strong>()</strong> <strong>{}</strong> //Private cstr</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong>public</strong> static <strong>readonly</strong> MySingleton Instance <strong>=</strong> <strong>new</strong> MySingleton<strong>();</strong></p>
<p><strong>}</strong></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">The class will be constructed the first time </span>MySingleton.Instance<span style="font-family: Calibri; font-size: small;"> is called and will be get-only because of </span><strong>readonly</strong><span style="font-size: small;"><span style="font-family: Calibri;">.&nbsp; This is also thread-safe without any locks (handled &nbsp;by the CLR).&nbsp; This is a Poor Man's singleton, because serious applications will have an IoC container to provide singletons.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Thanks for the double session &ndash; I picked up a few useful tips.&nbsp; Hopefully I am telling you something new and useful above in return </span>J</span></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Pie Chart Control Win RT Sample and updated Component</title>
      <link>https://docs.microsoft.com/archive/blogs/metroapps/pie-chart-control-win-rt-sample-and-updated-component</link>
      <pubDate>Thu, 17 Jan 2013 04:43:26 GMT</pubDate>
      <dc:creator><![CDATA[Mahmoud Medhat Moussa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/metroapps/2013/01/17/pie-chart-control-win-rt-sample-and-updated-component/</guid>
      <description><![CDATA[It’s been a while since I posted something, But I’ve been extremely Busy and I got soo many Requests...]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/8103.sample_4547B421.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/8103.sample_5F00_4547B421.jpg"><img title="sample" style="margin: 0px 20px 0px 0px; float: left; display: inline; background-image: none;" border="0" alt="sample" align="left" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/7026.sample_thumb_2A1EBF46.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/7026.sample_5F00_thumb_5F00_2A1EBF46.jpg" width="244" height="139" /></a>It’s been a while since I posted something, But I’ve been extremely Busy and I got soo many Requests about how to get my pie chart control Working,</p>  <p>&#160;</p>  <p>I’ve created a Sample project and updated some problems with the Pie Chart and Attached the App to this Blog post and again sorry for not replying to many of you but I’ve been really really busy “ Windows 8 is Rocking <img class="wlEmoticon wlEmoticon-openmouthedsmile" style="style" alt="Open-mouthed smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/1134.wlEmoticon-openmouthedsmile_5F67D1AB.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/1134.wlEmoticon_2D00_openmouthedsmile_5F00_5F67D1AB.png" />“</p>  <p>&#160;</p>  <p>The SkyDrive link is Here <a title="http://sdrv.ms/W2fv9n" href="http://sdrv.ms/W2fv9n">http://sdrv.ms/W2fv9n</a></p>  <p>&#160;</p>  <p>Regarding the codeplex Project you can follow any of the Silverlight Toolkit Samples as it is an Exact Replica use Porting it to Windows 8 </p>]]></content:encoded>
    </item>
    <item>
      <title>ModernUI Toolkit The Once Stop for All Chart Controls</title>
      <link>https://docs.microsoft.com/archive/blogs/metroapps/modernui-toolkit-the-once-stop-for-all-chart-controls</link>
      <pubDate>Fri, 28 Sep 2012 11:57:51 GMT</pubDate>
      <dc:creator><![CDATA[Mahmoud Medhat Moussa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/metroapps/2012/09/28/modernui-toolkit-the-once-stop-for-all-chart-controls/</guid>
      <description><![CDATA[I’ve just Integrated the Stacked Bar , Stacked Column , Stacked Line , Line Chart , Area Chart into...]]></description>
      <content:encoded><![CDATA[<p>I’ve just Integrated the Stacked Bar , Stacked Column , Stacked Line , Line Chart , Area Chart into the Control Set </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/8267.image_3DD2B933.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/8267.image_5F00_3DD2B933.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/8270.image_thumb_2CEE1543.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/8270.image_5F00_thumb_5F00_2CEE1543.png" width="588" height="406" /></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/54/13/metablogapi/5706.image_0BF118DD.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/5706.image_5F00_0BF118DD.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/8764.image_thumb_317D26EF.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/8764.image_5F00_thumb_5F00_317D26EF.png" width="590" height="233">&#160;</img></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Modern UI Data Visualization Toolkit</title>
      <link>https://docs.microsoft.com/archive/blogs/metroapps/modern-ui-data-visualization-toolkit</link>
      <pubDate>Thu, 27 Sep 2012 10:20:09 GMT</pubDate>
      <dc:creator><![CDATA[Mahmoud Medhat Moussa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/metroapps/2012/09/27/modern-ui-data-visualization-toolkit/</guid>
      <description><![CDATA[I’ve been Hiding for a while working on what I consider a big step for Modern Applications to Look...]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/6443.sample2_1672E491.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/6443.sample2_5F00_1672E491.jpg"><img title="sample2" style="margin: 0px 20px 0px 0px; float: left; display: inline; background-image: none;" border="0" alt="sample2" align="left" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/4784.sample2_thumb_378871DC.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/4784.sample2_5F00_thumb_5F00_378871DC.jpg" width="264" height="150" /></a>I’ve been Hiding for a while working on what I consider a big step for Modern Applications to Look Nicer with more charts and ways to display Data In Controls</p>  <p>So As a Matter of Fact I successfully Migrated the Famous Sliverlight toolkit to be running on Windows 8 Modern UI Applications.</p>  <p>Well, not everything is there yet since I’m Migrating Class By Class while understanding how things are working on this huge components </p>  <p>You can follow my project on CodePlex <a title="http://modernuitoolkit.codeplex.com/" href="http://modernuitoolkit.codeplex.com/">http://modernuitoolkit.codeplex.com/</a>&#160;</p>  <p>For Now you can find the Bar , Line , Column Chart and mixed Series Available, And I’m looking for people how can join me on this as it’s a very big project and I believe that this is the most advanced charting controls available for windows 8 So far with your help it can be even better.</p>  <p>&#160;</p>  <p>You can help with Ideas, Development Testing Bugs Reporting etc,</p>  <p>&#160;</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/2727.sample_6BBF2BD3.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/2727.sample_5F00_6BBF2BD3.jpg"><img title="sample" style="display: inline; background-image: none;" border="0" alt="sample" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/1050.sample_thumb_040C62E6.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/1050.sample_5F00_thumb_5F00_040C62E6.jpg" width="407" height="231" /></a></p>  <p>Sample of my Charts in Action </p>]]></content:encoded>
    </item>
    <item>
      <title>Migrating Windows Release Preview application to Windows 8 RTM – “Xaml Parsing Failed” Error</title>
      <link>https://docs.microsoft.com/archive/blogs/metroapps/migrating-windows-release-preview-application-to-windows-8-rtm-xaml-parsing-failed-error</link>
      <pubDate>Wed, 22 Aug 2012 13:47:32 GMT</pubDate>
      <dc:creator><![CDATA[Mahmoud Medhat Moussa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/metroapps/2012/08/22/migrating-windows-release-preview-application-to-windows-8-rtm-xaml-parsing-failed-error/</guid>
      <description><![CDATA[After installing windows 8 RTM and starting to work on my project I found there is a problem in my...]]></description>
      <content:encoded><![CDATA[<p>After installing windows 8 RTM and starting to work on my project I found there is a problem in my Usercontrols that was built in a separate project it always show and exception “Xaml Parsing Failed”</p>  <p>&#160;</p>  <p>this error really got me really hard I traced down the problem I found out that the problem is because of a the . in my Assembly name I was Generating from that project “was working great in early release of Visual Studio”</p>  <p>&#160;</p>  <p>anyway it was declared as error by Microsoft and they are doing to release a Hotfix for it soon. as a Quick correction you can remove the DOT from your assembly name.</p>  <p>&#160;</p>  <p>Check the below Article on technet for more details.</p>  <p>&#160;</p>  <p><a title="http://support.microsoft.com/kb/2739194" href="http://support.microsoft.com/kb/2739194">http://support.microsoft.com/kb/2739194</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Saving File to Byte Array in Windows 8 WinRT</title>
      <link>https://docs.microsoft.com/archive/blogs/metroapps/saving-file-to-byte-array-in-windows-8-winrt</link>
      <pubDate>Mon, 20 Aug 2012 11:31:03 GMT</pubDate>
      <dc:creator><![CDATA[Mahmoud Medhat Moussa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/metroapps/2012/08/20/saving-file-to-byte-array-in-windows-8-winrt/</guid>
      <description><![CDATA[I’ve been hitting my head to the ground for a couple of days trying send a byte array that...]]></description>
      <content:encoded><![CDATA[<p><img style="margin: 0px 10px 10px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" border="0" align="left" src="http://ts1.mm.bing.net/th?id=I4732509174038688&amp;pid=1.1" width="122" height="130" />I’ve been hitting my head to the ground for a couple of days trying send a byte array that represents my Image to my WCF Service in Windows 8, things has changed a lot when it comes to IO and Streams in Windows 8 so I included my code here for others to use </p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d2e80b66-bae9-4b65-9cdc-75b739382994" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Covert File to Byte Array</div> <div style="background: #fff; max-height: 300px; overflow: auto"> <ol style="background: #ffffff; margin: 0; padding: 0 0 0 5px;"> <li><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">private</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">async</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">Task</span><span style="background:#ffffff;color:#000000">&lt;</span><span style="background:#ffffff;color:#0000ff">byte</span><span style="background:#ffffff;color:#000000">[]&gt; ConvertImagetoByte(</span><span style="background:#ffffff;color:#2b91af">StorageFile</span><span style="background:#ffffff;color:#000000">image)</span></li> <li style="background: #f3f3f3">      <span style="background:#ffffff;color:#000000">{</span></li> <li>          <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">IRandomAccessStream</span><span style="background:#ffffff;color:#000000"> fileStream = </span><span style="background:#ffffff;color:#0000ff">await</span><span style="background:#ffffff;color:#000000"> image.OpenAsync(</span><span style="background:#ffffff;color:#2b91af">FileAccessMode</span><span style="background:#ffffff;color:#000000">.Read);</span></li> <li style="background: #f3f3f3">          <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">var</span><span style="background:#ffffff;color:#000000"> reader = </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> Windows.Storage.Streams.</span><span style="background:#ffffff;color:#2b91af">DataReader</span><span style="background:#ffffff;color:#000000">(fileStream.GetInputStreamAt(0));</span></li> <li>          <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">await</span><span style="background:#ffffff;color:#000000"> reader.LoadAsync((</span><span style="background:#ffffff;color:#0000ff">uint</span><span style="background:#ffffff;color:#000000">)fileStream.Size);</span></li> <li style="background: #f3f3f3">&nbsp;</li> <li>          <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">byte</span><span style="background:#ffffff;color:#000000">[] pixels = </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">byte</span><span style="background:#ffffff;color:#000000">[fileStream.Size];</span></li> <li style="background: #f3f3f3">&nbsp;</li> <li>          <span style="background:#ffffff;color:#000000">reader.ReadBytes(pixels);</span></li> <li style="background: #f3f3f3">&nbsp;</li> <li>          <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000"> pixels;</span></li> <li style="background: #f3f3f3">&nbsp;</li> <li>      <span style="background:#ffffff;color:#000000">}</span></li> </ol> </div> </div> </div>]]></content:encoded>
    </item>
    <item>
      <title>Loading Image from WCF Service Dynamically Metro Apps</title>
      <link>https://docs.microsoft.com/archive/blogs/metroapps/loading-image-from-wcf-service-dynamically-metro-apps</link>
      <pubDate>Thu, 16 Aug 2012 11:54:12 GMT</pubDate>
      <dc:creator><![CDATA[Mahmoud Medhat Moussa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/metroapps/2012/08/16/loading-image-from-wcf-service-dynamically-metro-apps/</guid>
      <description><![CDATA[I found it really hard to solve this problem in Windows 8 when you want to Load Images Dynamically...]]></description>
      <content:encoded><![CDATA[<p>I found it really hard to solve this problem in Windows 8 when you want to Load Images Dynamically from Server Side using WCF to your Metro App since most of code snippets avaiable online will not work with Metro Apps </p>  <p>&#160;</p>  <p>Basically here is the solution answer for you use the following snippets will solve your problem </p>  <p>&#160;</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:a00cb87a-3e6e-4447-a4e8-421e843940d3" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Load Images from Web Service</div> <div style="background: #ddd; max-height: 300px; overflow: auto"> <ol start="1" style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;"> <li><span style="background:#ffffff;color:#000000">HelperService.</span><span style="background:#ffffff;color:#2b91af">HelperManagerClient</span><span style="background:#ffffff;color:#000000"> client = </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> HelperService.</span><span style="background:#ffffff;color:#2b91af">HelperManagerClient</span><span style="background:#ffffff;color:#000000">();</span></li> <li style="background: #f3f3f3">            <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">byte</span><span style="background:#ffffff;color:#000000">[] imageData = </span><span style="background:#ffffff;color:#0000ff">await</span><span style="background:#ffffff;color:#000000"> client.GetCountryFlagAsync(countryCode);</span></li> <li>&nbsp;</li> <li style="background: #f3f3f3">            <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">var</span><span style="background:#ffffff;color:#000000"> ims = </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">InMemoryRandomAccessStream</span><span style="background:#ffffff;color:#000000">();</span></li> <li>            <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">var</span><span style="background:#ffffff;color:#000000"> dataWriter = </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">DataWriter</span><span style="background:#ffffff;color:#000000">(ims);</span></li> <li style="background: #f3f3f3">            <span style="background:#ffffff;color:#000000">dataWriter.WriteBytes(imageData);</span></li> <li>            <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">await</span><span style="background:#ffffff;color:#000000"> dataWriter.StoreAsync();</span></li> <li style="background: #f3f3f3">            <span style="background:#ffffff;color:#000000">ims.Seek(0);</span></li> <li>&nbsp;</li> <li style="background: #f3f3f3">            <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">BitmapImage</span><span style="background:#ffffff;color:#000000"> bitmap = </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#2b91af">BitmapImage</span><span style="background:#ffffff;color:#000000">();</span></li> <li>            <span style="background:#ffffff;color:#000000">bitmap.SetSource(ims);</span></li> <li style="background: #f3f3f3">            <span style="background:#ffffff;color:#000000">imgFlag.Source = bitmap;</span></li> </ol> </div> </div> </div>]]></content:encoded>
    </item>
    <item>
      <title>Pie Chart Source Code</title>
      <link>https://docs.microsoft.com/archive/blogs/metroapps/pie-chart-source-code</link>
      <pubDate>Tue, 14 Aug 2012 12:59:32 GMT</pubDate>
      <dc:creator><![CDATA[Mahmoud Medhat Moussa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/metroapps/2012/08/14/pie-chart-source-code/</guid>
      <description><![CDATA[Based on the amount of Requests I got for the PieChart Source Code I included my Project for...]]></description>
      <content:encoded><![CDATA[<p>Based on the amount of Requests I got for the PieChart Source Code I included my Project for download based on your Requests</p>  <p>&#160;</p>  <p><a title="https://skydrive.live.com/redir?resid=8B60D1F5DEC2AAA7!332&amp;authkey=!AC1FuVjc6ZUPQKw" href="https://skydrive.live.com/redir?resid=8B60D1F5DEC2AAA7!332&amp;authkey=!AC1FuVjc6ZUPQKw">https://skydrive.live.com/redir?resid=8B60D1F5DEC2AAA7!332&amp;authkey=!AC1FuVjc6ZUPQKw</a></p>]]></content:encoded>
    </item>
    <item>
      <title>The First Release of PieChart Control</title>
      <link>https://docs.microsoft.com/archive/blogs/metroapps/the-first-release-of-piechart-control</link>
      <pubDate>Mon, 30 Jul 2012 13:23:44 GMT</pubDate>
      <dc:creator><![CDATA[Mahmoud Medhat Moussa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/metroapps/2012/07/30/the-first-release-of-piechart-control/</guid>
      <description><![CDATA[So I’m glad to announce that the first release of of PieChart Control for WIndows 8 now Supports...]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/7652.image_4DA5CE45.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/7652.image_5F00_4DA5CE45.png"><img title="image" style="margin: 0px 10px 0px 0px; float: left; display: inline; background-image: none;" border="0" alt="image" align="left" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/13/metablogapi/6712.image_thumb_187B842C.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-13-metablogapi/6712.image_5F00_thumb_5F00_187B842C.png" width="244" height="217" /></a>So I’m glad to announce that the first release of of PieChart Control for WIndows 8 now Supports lots of interactive features like</p>  <p>- Support Default and Hole Type PieChart</p>  <p>- Legend and Tooltips</p>  <p>- Pushout feature for on Click events </p>  <p>- On Select and DeSelect Item from the PieChart</p>  <p>&#160;</p>  <p>Feel free to contact me if you need the source code and find below the download link for the assembly file <a href="https://skydrive.live.com/redir?resid=8B60D1F5DEC2AAA7!287&amp;authkey=!AAgPbCGccvGsl-w">Download Here</a></p>]]></content:encoded>
    </item>
    <item>
      <title>User Control Initialization in Windows 8</title>
      <link>https://docs.microsoft.com/archive/blogs/metroapps/user-control-initialization-in-windows-8</link>
      <pubDate>Mon, 30 Jul 2012 13:15:07 GMT</pubDate>
      <dc:creator><![CDATA[Mahmoud Medhat Moussa]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/metroapps/2012/07/30/user-control-initialization-in-windows-8/</guid>
      <description><![CDATA[I’ve been working on Building a Custom Charting Controls for Windows 8 and today I’ll talk about...]]></description>
      <content:encoded><![CDATA[<p><a href="http://emreesirik.com/wp-content/uploads/2010/11/XAML-MAN.jpg"><img style="margin: 0px 10px 0px 0px; float: left; display: inline;" align="left" src="http://emreesirik.com/wp-content/uploads/2010/11/XAML-MAN.jpg" width="200" height="233" /></a>I’ve been working on Building a Custom Charting Controls for Windows 8 and today I’ll talk about does InitializeComponents Work in Windows 8 User Controls,</p>  <p>when you build a Custom control for Windows 8 by Default InitalizeComponents will not be available so you need to build the method on your own to load controls from it</p>  <p>The Initialize Components Method needs to do the following </p>  <p>1. Load your Xaml file and Attach it to the Solution</p>  <p>2. Load your Controls into your Controls </p>  <p>Below is a Sample of how you can construct the InitalizeComponents Method</p>  <div id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:573b011a-42df-4aae-8e18-85709be1d79b" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;"> <div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"> <div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px">Code Snippet</div> <div style="background: #ddd; max-height: 300px; overflow: auto"> <ol start="1" style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;"> <li><span style="background:#ffffff;color:#0000ff">public</span><span style="background:#ffffff;color:#000000"> </span><span style="background:#ffffff;color:#0000ff">void</span><span style="background:#ffffff;color:#000000"> InitializeComponents()</span></li> <li style="background: #f3f3f3">        <span style="background:#ffffff;color:#000000">{</span></li> <li>            <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">if</span><span style="background:#ffffff;color:#000000"> (_contentLoaded)</span></li> <li style="background: #f3f3f3">                <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#0000ff">return</span><span style="background:#ffffff;color:#000000">;</span></li> <li>&nbsp;</li> <li style="background: #f3f3f3">            <span style="background:#ffffff;color:#000000">_contentLoaded = </span><span style="background:#ffffff;color:#0000ff">true</span><span style="background:#ffffff;color:#000000">;</span></li> <li>&nbsp;</li> <li style="background: #f3f3f3">            <span style="background:#ffffff;color:#000000"></span><span style="background:#ffffff;color:#2b91af">Application</span><span style="background:#ffffff;color:#000000">.LoadComponent(</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">, </span><span style="background:#ffffff;color:#0000ff">new</span><span style="background:#ffffff;color:#000000"> System.</span><span style="background:#ffffff;color:#2b91af">Uri</span><span style="background:#ffffff;color:#000000">(</span><span style="background:#ffffff;color:#a31515">&quot;ms-appx:///DataVirtualization.Toolkit/Legends/LegendItem.xaml&quot;</span><span style="background:#ffffff;color:#000000">),</span></li> <li>                <span style="background:#ffffff;color:#000000">Windows.UI.Xaml.Controls.Primitives.</span><span style="background:#ffffff;color:#2b91af">ComponentResourceLocation</span><span style="background:#ffffff;color:#000000">.Application);</span></li> <li style="background: #f3f3f3">&nbsp;</li> <li>            <span style="background:#ffffff;color:#000000">rec = (</span><span style="background:#ffffff;color:#2b91af">Rectangle</span><span style="background:#ffffff;color:#000000">)</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.FindName(</span><span style="background:#ffffff;color:#a31515">&quot;rec&quot;</span><span style="background:#ffffff;color:#000000">);</span></li> <li style="background: #f3f3f3">            <span style="background:#ffffff;color:#000000">text = (</span><span style="background:#ffffff;color:#2b91af">TextBlock</span><span style="background:#ffffff;color:#000000">)</span><span style="background:#ffffff;color:#0000ff">this</span><span style="background:#ffffff;color:#000000">.FindName(</span><span style="background:#ffffff;color:#a31515">&quot;text&quot;</span><span style="background:#ffffff;color:#000000">);</span></li> <li>        <span style="background:#ffffff;color:#000000">}</span></li> </ol> </div> </div> </div>  <p>as you can See I loaded the xaml file first using Application.LoadComponent</p>  <p>then used the method FindName in usercontrol to load the relative controls to my class, I hope that this post was helpful and thanks </p>]]></content:encoded>
    </item>
  </channel>
</rss>