<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Alessandro Del Sole's Blog</title>
        <link>http://community.visual-basic.it/alessandroEnglish/Default.aspx</link>
        <description>/* A programming space about Microsoft® .NET® */</description>
        <language>en-US</language>
        <copyright>alessandro.delsole@nospamvisual-basic.it</copyright>
        <generator>Subtext Version 2.6.0.0</generator>
        <image>
            <title>Alessandro Del Sole's Blog</title>
            <url>http://community.visual-basic.it/images/RSS2Image.gif</url>
            <link>http://community.visual-basic.it/alessandroEnglish/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Retrieving RSS feeds for Twitter and Facebook</title>
            <category>Misc</category>
            <link>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Retrieving-RSS-feeds-for-Twitter-and-Facebook.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana"&gt;You might need to analyze RSS feeds from different pages in order to get information and latest news from a channel. Facebook and Twitter are probably the most interesting, but there's no easy specific API.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Fortunately it is possible to retrieve the RSS feed 2.0, that is XML, in a pretty easy way. The following URL allows retrieving the RSS feed of a Facebook page (not user profile):&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" face="Verdana"&gt;https://www.facebook.com/feeds/page.php?id=pageidnumber&amp;amp;format=rss20&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Where &lt;font color="#800000"&gt;pageidnumber&lt;/font&gt; is the id of the desired page. For instance, the Facebook address for my VB community in Italy is the following:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" face="Verdana"&gt;https://www.facebook.com/feeds/page.php?id=295804250449780&amp;amp;format=rss20&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;About Twitter, you can retrieve a feed like this:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" face="Verdana"&gt;https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=username&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Where &lt;font color="#800000"&gt;username&lt;/font&gt; is the account name of the person you are following. For instance, this is the RSS feed for the profile of my Italian VB community:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" face="Verdana"&gt;https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=vbtipsandtricks&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;You might find this useful &lt;img alt="" src="http://community.visual-basic.it/aspx/providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/wink_smile.gif" /&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;font color="#339966" face="Verdana"&gt;Alessandro&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://community.visual-basic.it/alessandroEnglish/aggbug/38443.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>alessandro.delsole@nospamvisual-basic.it</dc:creator>
            <guid>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Retrieving-RSS-feeds-for-Twitter-and-Facebook.aspx</guid>
            <pubDate>Thu, 14 Mar 2013 10:32:26 GMT</pubDate>
            <comments>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Retrieving-RSS-feeds-for-Twitter-and-Facebook.aspx#feedback</comments>
            <wfw:commentRss>http://community.visual-basic.it/alessandroEnglish/comments/commentRss/38443.aspx</wfw:commentRss>
            <trackback:ping>http://community.visual-basic.it/alessandroEnglish/services/trackbacks/38443.aspx</trackback:ping>
        </item>
        <item>
            <title>Windows Phone: picking up contacts in code</title>
            <category>Silverlight/Windows Phone</category>
            <link>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Windows-Phone-picking-up-contacts-in-code.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana"&gt;In Windows Phone apps, you can easily pick up contacts from the contact list in code. You simply need to use a chooser called &lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font face="Courier New"&gt;Microsoft.Phone.Tasks.AddressChooserTask&lt;/font&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;You define an instance:&lt;/font&gt;&lt;/p&gt;
&lt;font face="Verdana"&gt;
&lt;pre style="FONT-SIZE: 13px; FONT-FAMILY: Consolas; BACKGROUND: white; COLOR: black"&gt;&lt;font face="Courier New"&gt;    &lt;span style="COLOR: blue"&gt;Private&lt;/span&gt; contattoSelezionato &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: blue"&gt;String&lt;/span&gt;
 
    &lt;span style="COLOR: blue"&gt;Dim&lt;/span&gt; &lt;span style="COLOR: blue"&gt;WithEvents&lt;/span&gt; addressChooser &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;AddressChooserTask&lt;/span&gt;
 
    &lt;span style="COLOR: blue"&gt;Public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Sub&lt;/span&gt; &lt;span style="COLOR: blue"&gt;New&lt;/span&gt;()
        InitializeComponent()
        &lt;span style="COLOR: blue"&gt;Me&lt;/span&gt;.addressChooser = &lt;span style="COLOR: blue"&gt;New&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;AddressChooserTask&lt;/span&gt;
     &lt;span style="COLOR: blue"&gt;End&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Sub&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Then you invoke Show to start the chooser:&lt;/font&gt;&lt;/p&gt;
&lt;font face="Verdana"&gt;
&lt;pre style="FONT-SIZE: 13px; FONT-FAMILY: Consolas; BACKGROUND: white; COLOR: black"&gt;&lt;font face="Courier New"&gt;addressChooser.Show()&lt;/font&gt;
&lt;/pre&gt;
&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;To determine the returned contact, you handle the Completed event and you read the value only if the user has confirmed her choice (&lt;/font&gt;the&lt;font face="Verdana"&gt; &lt;font face="Courier New"&gt;TaskResult.OK&lt;/font&gt; value from the &lt;font face="Courier New"&gt;TaskResult &lt;/font&gt;enum):&lt;/font&gt;&lt;/p&gt;
&lt;font face="Verdana"&gt;
&lt;pre style="FONT-SIZE: 13px; FONT-FAMILY: Consolas; BACKGROUND: white; COLOR: black"&gt;&lt;font face="Courier New"&gt;    &lt;span style="COLOR: blue"&gt;Private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Sub&lt;/span&gt; addressChooser_Completed(sender &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Object&lt;/span&gt;, e &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;AddressResult&lt;/span&gt;) &lt;span style="COLOR: blue"&gt;Handles&lt;/span&gt; addressChooser.Completed
        &lt;span style="COLOR: blue"&gt;If&lt;/span&gt; e.TaskResult = &lt;span style="COLOR: #2b91af"&gt;TaskResult&lt;/span&gt;.OK &lt;span style="COLOR: blue"&gt;Then&lt;/span&gt;
            &lt;span style="COLOR: blue"&gt;Me&lt;/span&gt;.contattoSelezionato = e.DisplayName
        &lt;span style="COLOR: blue"&gt;End&lt;/span&gt; &lt;span style="COLOR: blue"&gt;If&lt;/span&gt;
    &lt;span style="COLOR: blue"&gt;End&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Sub&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Other than the &lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font face="Courier New"&gt;DisplayName&lt;/font&gt; you can also retrieve the &lt;font face="Courier New"&gt;Address&lt;/font&gt; , which is actually the value that determines the difference between contacts with the same name or between elements belonging to the same contact. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#339966" face="Verdana"&gt;&lt;strong&gt;&lt;em&gt;Alessandro&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://community.visual-basic.it/alessandroEnglish/aggbug/38442.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>alessandro.delsole@nospamvisual-basic.it</dc:creator>
            <guid>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Windows-Phone-picking-up-contacts-in-code.aspx</guid>
            <pubDate>Thu, 14 Mar 2013 10:25:01 GMT</pubDate>
            <comments>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Windows-Phone-picking-up-contacts-in-code.aspx#feedback</comments>
            <wfw:commentRss>http://community.visual-basic.it/alessandroEnglish/comments/commentRss/38442.aspx</wfw:commentRss>
            <trackback:ping>http://community.visual-basic.it/alessandroEnglish/services/trackbacks/38442.aspx</trackback:ping>
        </item>
        <item>
            <title>A VS2012 extension to use the WinRT APIs in desktop apps</title>
            <category>Windows 8 &amp; WinRT</category>
            <category>Visual Studio 2012</category>
            <link>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/A-VS2012-extension-to-use-the-WinRT-APIs-in-desktop.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana"&gt;Anyone who has ever built for Windows 8 and the Windows Runtime probably wondered how it is possible to use WinRT in desktop applications.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Even though with some limitations, this is possible and requires some manual steps so that a project can reference Windows 8's libraries.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;&lt;a href="http://blogs.msdn.com/lucian"&gt;Lucian Wischik&lt;/a&gt;  has published an interesting extension for Visual Studio 2012, which adds a Console app project template which is ready to take advantage of WinRT.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Such an extension is available from the &lt;font color="#800000"&gt;Visual Studio Gallery&lt;/font&gt; at this &lt;a href="http://visualstudiogallery.msdn.microsoft.com/3c68246b-8103-467c-9557-894b1f837591"&gt;address&lt;/a&gt;, where you will also find hints for the usage.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Lucian has also published an &lt;a href="http://www.codeproject.com/Articles/457335/How-to-call-WinRT-APIs-from-NET-desktop-apps"&gt;article on CodeProject&lt;/a&gt;, where he provides detailed information about this scenario.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Remember that som APIs from WinRT cannot be used on the desktop for privacy and security reasons, especially those related to some devices and that work in a sandboxed environment.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#339966" face="Verdana"&gt;&lt;strong&gt;&lt;em&gt;Alessandro&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://community.visual-basic.it/alessandroEnglish/aggbug/38441.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>alessandro.delsole@nospamvisual-basic.it</dc:creator>
            <guid>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/A-VS2012-extension-to-use-the-WinRT-APIs-in-desktop.aspx</guid>
            <pubDate>Thu, 14 Mar 2013 10:20:04 GMT</pubDate>
            <comments>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/A-VS2012-extension-to-use-the-WinRT-APIs-in-desktop.aspx#feedback</comments>
            <wfw:commentRss>http://community.visual-basic.it/alessandroEnglish/comments/commentRss/38441.aspx</wfw:commentRss>
            <trackback:ping>http://community.visual-basic.it/alessandroEnglish/services/trackbacks/38441.aspx</trackback:ping>
        </item>
        <item>
            <title>WinRT: ho to solve if ListView and GridView lose their way</title>
            <category>Windows 8 &amp; WinRT</category>
            <link>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/WinRT-ho-to-solve-if-ListView-and-GridView-lose-their.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana"&gt;In a Windows Store App I've been working on, I had to face a particular problem. It is a problem that can randomly occur with the &lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font color="#800000" face="Courier New"&gt;GridView&lt;/font&gt; and &lt;font color="#800000" face="Courier New"&gt;ListView&lt;/font&gt; controls and it probably depends on the DataTemplate you use. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Consider the following &lt;font color="#800000" face="Courier New"&gt;GridView&lt;/font&gt;:&lt;/font&gt;&lt;/p&gt;
&lt;font face="Verdana"&gt;
&lt;pre style="FONT-SIZE: 13px; FONT-FAMILY: Consolas; BACKGROUND: white; COLOR: black"&gt;&lt;font face="Courier New"&gt;                &lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;GridView&lt;/span&gt;&lt;span style="COLOR: red"&gt; Name&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="COLOR: blue"&gt;"MyView"&lt;/span&gt;&lt;span style="COLOR: red"&gt; ItemsSource&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="{&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;Binding&lt;/span&gt;&lt;span style="COLOR: blue"&gt;}&lt;/span&gt;&lt;span style="COLOR: blue"&gt;"&lt;/span&gt;&lt;span style="COLOR: red"&gt; Margin&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="COLOR: blue"&gt;"0,15,0,0"&lt;/span&gt;&lt;span style="COLOR: red"&gt; HorizontalAlignment&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="COLOR: blue"&gt;"Left"&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;GridView.ItemTemplate&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;font color="#339966"&gt;                            &lt;span style="COLOR: red"&gt;&lt;font color="#339966"&gt;&amp;lt;!-- custom DataTemplate --&amp;gt;&lt;/font&gt;&lt;/span&gt;
&lt;/font&gt;                        &lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;DataTemplate&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;GridView.ItemTemplate&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
                &lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;GridView&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/font&gt;
&lt;/pre&gt;
&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;In this page I have this object; then I navigate to a secondary page. From the secondary page, I navigate back to the page where I have the &lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font color="#800000" face="Courier New"&gt;GridView&lt;/font&gt;. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;As a result, instead of showing items horizontally (as required), the control shows them vertically losing the original orientation.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;I searched on the Internet but the only one taling about this problem is a guy at Microsoft, who provides a possible solution in this blog &lt;/font&gt;&lt;font face="Verdana"&gt;&lt;a href="http://blogs.msdn.com/b/priozersk/archive/2012/09/09/how-to-restore-scroll-position-of-the-gridview-when-navigating-back.aspx"&gt;post&lt;/a&gt;. Unfortunately that solution did not work for me, so what I did is changing the template of the panel for the view. In this case I used a &lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font face="Courier New"&gt;StackPanel&lt;/font&gt;. This works well for me because I have a few items and I don't need virtualization. In code:&lt;/font&gt;&lt;/p&gt;
&lt;font face="Verdana"&gt;
&lt;pre style="FONT-SIZE: 13px; FONT-FAMILY: Consolas; BACKGROUND: white; COLOR: black"&gt;&lt;font face="Courier New"&gt;                    &lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;GridView.ItemsPanel&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;ItemsPanelTemplate&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
                            &lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;StackPanel&lt;/span&gt;&lt;span style="COLOR: red"&gt; Orientation&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="COLOR: blue"&gt;"Horizontal"&lt;/span&gt;&lt;span style="COLOR: blue"&gt;/&amp;gt;&lt;/span&gt;
                        &lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;ItemsPanelTemplate&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;GridView.ItemsPanel&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;In this way, everything worked correctly. In conclusion, if you face this problem remember to work on the &lt;font color="#800000" face="Courier New"&gt;ItemsPanelTemplate&lt;/font&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#339966" face="Verdana"&gt;&lt;strong&gt;&lt;em&gt;Alessandro&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://community.visual-basic.it/alessandroEnglish/aggbug/38440.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>alessandro.delsole@nospamvisual-basic.it</dc:creator>
            <guid>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/WinRT-ho-to-solve-if-ListView-and-GridView-lose-their.aspx</guid>
            <pubDate>Thu, 14 Mar 2013 10:14:17 GMT</pubDate>
            <comments>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/WinRT-ho-to-solve-if-ListView-and-GridView-lose-their.aspx#feedback</comments>
            <wfw:commentRss>http://community.visual-basic.it/alessandroEnglish/comments/commentRss/38440.aspx</wfw:commentRss>
            <trackback:ping>http://community.visual-basic.it/alessandroEnglish/services/trackbacks/38440.aspx</trackback:ping>
        </item>
        <item>
            <title>Playing media contents in loop with the MediaElement control</title>
            <category>Silverlight/Windows Phone</category>
            <category>Windows Presentation Foundation</category>
            <category>Windows 8 &amp; WinRT</category>
            <link>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Playing-media-contents-in-loop-with-the-MediaElement-control.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana"&gt;The &lt;font color="#800000" face="Courier New"&gt;MediaElement&lt;/font&gt; control is used to play media contents in Technologies like &lt;/font&gt;&lt;font face="Verdana"&gt;WPF, Silverlight, WinRT and Windows Phone.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;You might have the need to play a content forever, with a loop. A very easy way to accomplish this is Handling the &lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font face="Courier New"&gt;MediaEnded&lt;/font&gt; and restart from there.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;For example, we declare a boolean variable to store the loop state (enabled/disabled):&lt;/font&gt;&lt;/p&gt;
&lt;font face="Verdana"&gt;
&lt;pre style="FONT-SIZE: 13px; FONT-FAMILY: Consolas; BACKGROUND: white; COLOR: black"&gt;&lt;font face="Courier New"&gt;&lt;span style="COLOR: blue"&gt;Private&lt;/span&gt; isLoop &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Boolean&lt;/span&gt; = &lt;span style="COLOR: blue"&gt;False&lt;/span&gt;&lt;/font&gt;
&lt;/pre&gt;
&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;This can be useful if we associate the state of the loop to a button, which is just responsible to change its value: &lt;/font&gt;&lt;/p&gt;
&lt;font face="Verdana"&gt;
&lt;pre style="FONT-SIZE: 13px; FONT-FAMILY: Consolas; BACKGROUND: white; COLOR: black"&gt;&lt;font face="Courier New"&gt;    &lt;span style="COLOR: blue"&gt;Private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Sub&lt;/span&gt; LoopButton_Click(sender &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Object&lt;/span&gt;, e &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;EventArgs&lt;/span&gt;)
        isLoop = &lt;span style="COLOR: blue"&gt;Not&lt;/span&gt; isLoop
    &lt;span style="COLOR: blue"&gt;End&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Sub&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Somewhere else we'll start playing the content; the important thing is how we handle the event, like in the following example:&lt;/font&gt;&lt;/p&gt;
&lt;font face="Verdana"&gt;
&lt;pre style="FONT-SIZE: 13px; FONT-FAMILY: Consolas; BACKGROUND: white; COLOR: black"&gt;&lt;font face="Courier New"&gt;    &lt;span style="COLOR: blue"&gt;Private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Sub&lt;/span&gt; Media1_MediaEnded(sender &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Object&lt;/span&gt;, e &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;RoutedEventArgs&lt;/span&gt;) &lt;span style="COLOR: blue"&gt;Handles&lt;/span&gt; Media1.MediaEnded
        &lt;span style="COLOR: blue"&gt;If&lt;/span&gt; isLoop = &lt;span style="COLOR: blue"&gt;True&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Then&lt;/span&gt;
            &lt;span style="COLOR: blue"&gt;Me&lt;/span&gt;.Media1.Position = &lt;span style="COLOR: blue"&gt;New&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;TimeSpan&lt;/span&gt;(0)
            &lt;span style="COLOR: blue"&gt;Me&lt;/span&gt;.Media1.Play()
        &lt;span style="COLOR: blue"&gt;End&lt;/span&gt; &lt;span style="COLOR: blue"&gt;If&lt;/span&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;    &lt;span style="COLOR: blue"&gt;End&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Sub&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Basically the code first checks if the loop state is active, then it moves the position back to zero and restarts playing.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#339966" face="Verdana"&gt;&lt;strong&gt;&lt;em&gt;Alessandro&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://community.visual-basic.it/alessandroEnglish/aggbug/38439.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>alessandro.delsole@nospamvisual-basic.it</dc:creator>
            <guid>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Playing-media-contents-in-loop-with-the-MediaElement-control.aspx</guid>
            <pubDate>Thu, 14 Mar 2013 10:04:32 GMT</pubDate>
            <comments>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Playing-media-contents-in-loop-with-the-MediaElement-control.aspx#feedback</comments>
            <wfw:commentRss>http://community.visual-basic.it/alessandroEnglish/comments/commentRss/38439.aspx</wfw:commentRss>
            <trackback:ping>http://community.visual-basic.it/alessandroEnglish/services/trackbacks/38439.aspx</trackback:ping>
        </item>
        <item>
            <title>My first eBook: "Hidden WPF"</title>
            <category>Windows Presentation Foundation</category>
            <link>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/My-first-eBook-Hidden-WPF.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana"&gt;A few days ago, we have released my first eBook called "&lt;/font&gt;&lt;font face="Verdana"&gt;&lt;a href="http://www.informit.com/store/hidden-wpf-secrets-for-creating-great-applications-9780672334481"&gt;Hidden WPF: Secrets for creating great applications in WPF&lt;/a&gt;":&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="zoomOpener" href="http://www.informit.com/store/hidden-wpf-secrets-for-creating-great-applications-9780672334481"&gt;&lt;img class="product" alt="Hidden WPF: Secrets for Creating Great Applications in Windows Presentation Foundation" width="160" src="http://www.informit.com/ShowCover.aspx?isbn=0672334488&amp;amp;type=f" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Published by &lt;a href="http://www.informit.com"&gt;InformIT&lt;/a&gt; (the online division of my publisher SAMS/Pearson), this is a different publication. It's a very small book, 99 pages, produced and thought for mobile devices. Here you will find tons of tips &amp;amp; tricks, suggestions, and real world implementations that I collected in my daily work, building applications with &lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font color="#800000"&gt;Windows Presentation Foundation&lt;/font&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Price is $ 7,99. You will find many info about working with PDF and XPS documents, suggestions to get the most out of the Visual Studio IDE with WPF, enhancing your debugging experience, improving the user interface performance, common requirements (e.g. ComboBox controls with lookup tables), descriptions of Productivity tools either free or paid, that you might have probably missed.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;I'm aware that WPF has been definitely become very popular in the developer community Worldwide, so probably this publication can bring you some value. After all, we do not have to forget that WPF is the premiere technology about building apps for the Desktop, despite HTML5, the Web, and the apps for Windows 8.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#339966" face="Verdana"&gt;&lt;strong&gt;&lt;em&gt;Alessandro&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://community.visual-basic.it/alessandroEnglish/aggbug/38438.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>alessandro.delsole@nospamvisual-basic.it</dc:creator>
            <guid>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/My-first-eBook-Hidden-WPF.aspx</guid>
            <pubDate>Thu, 14 Mar 2013 09:58:26 GMT</pubDate>
            <comments>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/My-first-eBook-Hidden-WPF.aspx#feedback</comments>
            <wfw:commentRss>http://community.visual-basic.it/alessandroEnglish/comments/commentRss/38438.aspx</wfw:commentRss>
            <trackback:ping>http://community.visual-basic.it/alessandroEnglish/services/trackbacks/38438.aspx</trackback:ping>
        </item>
        <item>
            <title>Windows Phone: the SaveAppointmentTask class</title>
            <category>Silverlight/Windows Phone</category>
            <link>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Windows-Phone-the-SaveAppointmentTask-class.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana"&gt;The Windows Phone 8 SDK introduces new launchers, which are tasks on the phone that you can interact with via managed code. Among the Others, the new &lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font face="Courier New"&gt;Microsoft.Phone.Tasks.SaveAppointmentTask&lt;/font&gt; class allows saving an appointment in the calendar or an activity in the specified time interval. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;For instance, the following code creates an appointment in the calendar: &lt;/font&gt;&lt;/p&gt;
&lt;font face="Verdana"&gt;
&lt;pre style="FONT-SIZE: 13px; FONT-FAMILY: Consolas; BACKGROUND: white; COLOR: black"&gt;&lt;font face="Courier New"&gt;        &lt;span style="COLOR: blue"&gt;Dim&lt;/span&gt; appointmentTask &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: blue"&gt;New&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;SaveAppointmentTask&lt;/span&gt;
        &lt;span style="COLOR: blue"&gt;With&lt;/span&gt; appointmentTask
            .AppointmentStatus = Microsoft.Phone.UserData.&lt;span style="COLOR: #2b91af"&gt;AppointmentStatus&lt;/span&gt;.OutOfOffice
            .Details = &lt;span style="COLOR: #a31515"&gt;"Going on vacations"&lt;/span&gt;
            .StartTime = &lt;span style="COLOR: blue"&gt;New&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Date&lt;/span&gt;(2013, 7, 1)
            .EndTime = &lt;span style="COLOR: blue"&gt;New&lt;/span&gt; &lt;span style="COLOR: blue"&gt;Date&lt;/span&gt;(2013, 7, 18)
            .Location = &lt;span style="COLOR: #a31515"&gt;"Seaside"&lt;/span&gt;
            .Reminder = &lt;span style="COLOR: #2b91af"&gt;Reminder&lt;/span&gt;.OneDay
            .Subject = &lt;span style="COLOR: #a31515"&gt;"I'm not available"&lt;/span&gt;
            .Show()
        &lt;span style="COLOR: blue"&gt;End&lt;/span&gt; &lt;span style="COLOR: blue"&gt;With&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;/font&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Properties are pretty self-explanatory, in particular focus on the &lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font face="Courier New"&gt;AppointmentStatus&lt;/font&gt; one which allows chosing how we should appear to our contacts, by selecting a value from the &lt;font face="Courier New"&gt;Microsoft.Phone.UserData.AppointmentStatus&lt;/font&gt;. We can chose among &lt;font face="Courier New"&gt;OutOfOffice&lt;/font&gt;, &lt;font face="Courier New"&gt;Busy&lt;/font&gt;, &lt;font face="Courier New"&gt;Free&lt;/font&gt;, &lt;font face="Courier New"&gt;Tentative&lt;/font&gt; . &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;The &lt;font face="Courier New"&gt;Reminder &lt;/font&gt;property instead allows selecting a value from the &lt;font face="Courier New"&gt;Microsoft.Phone.Tasks.Reminder&lt;/font&gt; to set the reminder time. In this case, a reminder appears the day before (&lt;font face="Courier New"&gt;OneDay&lt;/font&gt;) but many are the available values. IntelliSense will help you as usual. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;Of course the appointment will not be saved directly, but it will require interaction with the user who will be able to edit the appointment details via a familiar user interface, as demonstrated in the following figure:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;&lt;img alt="" width="480" height="800" src="http://community.visual-basic.it/images/community_visual-basic_it/Alessandro/Metro/MiAssento.png" /&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#339966" face="Verdana"&gt;&lt;strong&gt;&lt;em&gt;Alessandro&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://community.visual-basic.it/alessandroEnglish/aggbug/38437.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>alessandro.delsole@nospamvisual-basic.it</dc:creator>
            <guid>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Windows-Phone-the-SaveAppointmentTask-class.aspx</guid>
            <pubDate>Thu, 14 Mar 2013 09:50:23 GMT</pubDate>
            <comments>http://community.visual-basic.it/alessandroEnglish/archive/2013/03/14/Windows-Phone-the-SaveAppointmentTask-class.aspx#feedback</comments>
            <wfw:commentRss>http://community.visual-basic.it/alessandroEnglish/comments/commentRss/38437.aspx</wfw:commentRss>
            <trackback:ping>http://community.visual-basic.it/alessandroEnglish/services/trackbacks/38437.aspx</trackback:ping>
        </item>
        <item>
            <title>My new book "Visual Basic 2012 Unleashed" is available</title>
            <category>Visual Basic</category>
            <category>Silverlight/Windows Phone</category>
            <category>Windows Presentation Foundation</category>
            <category>Windows Communication Foundation</category>
            <category>LINQ/EF/OData</category>
            <category>Misc</category>
            <category>.NET Framework</category>
            <category>Help Authoring</category>
            <category>Setup &amp; Deployment</category>
            <category>Visual Studio Extensibility</category>
            <category>Visual Studio Express Editions</category>
            <category>Windows Azure</category>
            <category>Windows 8 &amp; WinRT</category>
            <category>Visual Studio 2012</category>
            <link>http://community.visual-basic.it/alessandroEnglish/archive/2013/01/28/My-new-book-Visual-Basic-2012-Unleashed-is-available.aspx</link>
            <description>&lt;p&gt;&lt;font face="Verdana"&gt;I'm pleased and proud to announce that my new book "&lt;a href="http://www.amazon.com/Visual-Basic-2012-Unleashed-Edition/dp/0672336316"&gt;Visual Basic 2012 Unleashed&lt;/a&gt;" is available, both paperback and digital edition!&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://www.informit.com/ShowCover.aspx?isbn=0672336316&amp;amp;type=f" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;This time I had the honor of featuring &lt;a href="http://blogs.msdn.com/b/lucian/"&gt;Lucian Wischik&lt;/a&gt;, the VB Specification Lead at Microsoft, as the author of a great foreword. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;As usual, it has really been a hard work, but fortunately working with a great team (including &lt;a href="http://zerosandtheone.com/"&gt;Matthew Kleinwaks&lt;/a&gt; as the tech editor) makes things easier. The book has been fully updated to target the .NET Framework 4.5 and the new features in the Visual Basic programming Language, such as the Async/Await pattern, new tools in the IDE, Windows Phone development, new keywords and implementations such as the Global namespaces, iterators and the Yield keyword. Also, the book is not limited to the Language, but it also shows how to use Visual Basic with the most recent Technologies and platforms from Microsoft, including Windows Azure, Silverlight 5, WPF 4.5.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;A good part of the book guides you through special tools that will help you write high-quality code.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;As in the past, I always try to add tips &amp;amp; tricks coming from my real-world experience with Visual Basic and the .NET Framework. You can download the &lt;a href="http://www.informit.com/content/images/9780672336317/samplepages/0672336316.pdf"&gt;table of contents and a sample chapter&lt;/a&gt; from the &lt;a href="http://www.amazon.com/Visual-Basic-2012-Unleashed-Edition/dp/0672336316"&gt;book site&lt;/a&gt;, including the source code which is available as a &lt;a href="http://www.informit.com/content/downloads/sourcecode/VB2012Unleashed_SourceCode_9780672336317.zip"&gt;free download&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;I hope you will have a look and that you will find it useful. Enjoy!&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;font color="#339966" face="Verdana"&gt;Alessandro&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://community.visual-basic.it/alessandroEnglish/aggbug/38398.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>alessandro.delsole@nospamvisual-basic.it</dc:creator>
            <guid>http://community.visual-basic.it/alessandroEnglish/archive/2013/01/28/My-new-book-Visual-Basic-2012-Unleashed-is-available.aspx</guid>
            <pubDate>Mon, 28 Jan 2013 22:43:03 GMT</pubDate>
            <comments>http://community.visual-basic.it/alessandroEnglish/archive/2013/01/28/My-new-book-Visual-Basic-2012-Unleashed-is-available.aspx#feedback</comments>
            <wfw:commentRss>http://community.visual-basic.it/alessandroEnglish/comments/commentRss/38398.aspx</wfw:commentRss>
            <trackback:ping>http://community.visual-basic.it/alessandroEnglish/services/trackbacks/38398.aspx</trackback:ping>
        </item>
    </channel>
</rss>