<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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Work</title>
        <link>http://geekswithblogs.net/lbugnion/category/7619.aspx</link>
        <description>About my work at Siemens</description>
        <language>en-US</language>
        <copyright>Laurent Bugnion</copyright>
        <managingEditor>laurent@galasoft.ch</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
        <item>
            <title>2 years and 266 posts later...</title>
            <link>http://geekswithblogs.net/lbugnion/archive/2008/06/11/2-years-and-266-posts-later.aspx</link>
            <description>&lt;p class="gslb_rsbPParagraph"&gt;2 years ago, on a Sunday, I posted my first blog post. Since then so many amazing things happened, partly due to this blog: I got the MVP status, I got a better recognition in my firm for my expert knowledge on some topics (such as WPF, Silverlight, ASP.NET and C#), I started speaking in conferences... One year later, I got a book deal (more on this soon). I met amazing people, and made a lot of new friends in the industry. I went to Redmond a few times and had the chance to talk to some really amazing talents in the software field. More importantly, I really had the feeling that my contributions were acknowledged, and valued. It's really been 2 amazing years. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt;To all of you reading these lines, thank you. You make my life as a software engineer better, more interesting, and you really help become a better developer. &lt;/p&gt; &lt;div class="gslb_rsbDivImage"&gt;&lt;img title="Thank you" alt="Thank you" src="http://www.galasoft.ch/blogs-all/2008061101.jpg" /&gt; &lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122794"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122794" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/lbugnion/aggbug/122794.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://geekswithblogs.net/lbugnion/archive/2008/06/11/2-years-and-266-posts-later.aspx</guid>
            <pubDate>Wed, 11 Jun 2008 13:05:21 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/lbugnion/comments/122794.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/lbugnion/archive/2008/06/11/2-years-and-266-posts-later.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/lbugnion/comments/commentRss/122794.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/lbugnion/services/trackbacks/122794.aspx</trackback:ping>
        </item>
        <item>
            <title>Silverlight 2 beta 2 is live!</title>
            <link>http://geekswithblogs.net/lbugnion/archive/2008/06/07/silverlight-2-beta-2-is-live.aspx</link>
            <description>&lt;p&gt;Here we go, Silverlight 2 beta 2 can be downloaded and installed! I had the chance to take part to an "insiders" program at Microsoft, and to play with SL2 b2 for a couple of weeks, and it's a good one. You should switch to b2 as soon as you can!&lt;/p&gt; &lt;p&gt;There are obviously incompatibilities between b1 and b2, but much, much less than between the alpha version and b1. We're getting there!!&lt;/p&gt; &lt;p&gt;Silverlight 2 beta 2 will be used to build applications related to the Beijing olympics, so it's going to be a real nature test for that version. As for the final release.... it's still very much hush hush, so let's leave it for now :)&lt;/p&gt; &lt;p&gt;The best place to start is &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/06/06/silverlight-2-beta2-released.aspx"&gt;ScottGu's blog&lt;/a&gt;. As usual, Scott describes the new features at length, and has links to all the places where you can download the good stuff.&lt;/p&gt; &lt;p&gt;Note that there is also a new version of Blend 2.5 which can be installed next to a "normal" Expression Blend V2. There is supposed to be a new version of Deep Zoom Composer too, but the download seems to be down currently.&lt;/p&gt; &lt;p&gt;Enjoy!!&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122688"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122688" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/lbugnion/aggbug/122688.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://geekswithblogs.net/lbugnion/archive/2008/06/07/silverlight-2-beta-2-is-live.aspx</guid>
            <pubDate>Sat, 07 Jun 2008 06:23:40 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/lbugnion/comments/122688.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/lbugnion/archive/2008/06/07/silverlight-2-beta-2-is-live.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/lbugnion/comments/commentRss/122688.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/lbugnion/services/trackbacks/122688.aspx</trackback:ping>
        </item>
        <item>
            <title>A short break</title>
            <link>http://geekswithblogs.net/lbugnion/archive/2008/05/31/a-short-break.aspx</link>
            <description>&lt;p class="gslb_rsbPParagraph"&gt;I am going to take a short break of blogging for a couple of months. The reason is simple: I have been working on a book about Silverlight 2 since September last year, and we are in a phase now where I need to concentrate on that exclusively, and put other activities aside. I might post the occasional article from time to time, but until mid-Summer, it's going to be write write write. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt;Stay posted for news about the book coming up, and don't delete me from your feeds, it's really only temporary :) &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122512"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122512" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/lbugnion/aggbug/122512.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://geekswithblogs.net/lbugnion/archive/2008/05/31/a-short-break.aspx</guid>
            <pubDate>Sat, 31 May 2008 11:34:38 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/lbugnion/comments/122512.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/lbugnion/archive/2008/05/31/a-short-break.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/lbugnion/comments/commentRss/122512.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/lbugnion/services/trackbacks/122512.aspx</trackback:ping>
        </item>
        <item>
            <title>My talk at the &amp;quot;Internet Briefing RIA conference&amp;quot; in Zurich</title>
            <link>http://geekswithblogs.net/lbugnion/archive/2008/05/29/my-talk-at-the-quotinternet-briefing-ria-conferencequot-in-zurich.aspx</link>
            <description>&lt;p class="gslb_rsbPParagraph"&gt; I just &lt;a href="http://www.galasoft.ch/presentations_en.html#UltraRichApplications" target="_blank"&gt;posted today's talk&lt;/a&gt; at the RIA conference in the World Trade Center, Zurich. Unfortunately it was not recorded, but the slides and the demos' source code is available on my site. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt; The talk went really good, even though the crowd was rather tough :) Trying to "sell" Windows Presentation Foundation, a desktop Windows-only technology, to an audience of web developers, many of them using Java and open source technologies (and even one Adobe employee) sparkled some very interesting discussions. I can't say I convinced everyone (and it was most certainly not my intention), but I think everybody had a really good time. I know for sure that I did! &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt; To all those who stayed until the end of my presentation, and even though mine was the last presentation of the day, thank you very much!! To those who couldn't stay, I hope you'll have fun checking the slides and the demos, and &lt;a href="http://www.galasoft.ch/contact" target="_blank"&gt;contact me&lt;/a&gt; if anything is unclear!! &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122482"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122482" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/lbugnion/aggbug/122482.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://geekswithblogs.net/lbugnion/archive/2008/05/29/my-talk-at-the-quotinternet-briefing-ria-conferencequot-in-zurich.aspx</guid>
            <pubDate>Thu, 29 May 2008 21:11:28 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/lbugnion/comments/122482.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/lbugnion/archive/2008/05/29/my-talk-at-the-quotinternet-briefing-ria-conferencequot-in-zurich.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/lbugnion/comments/commentRss/122482.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/lbugnion/services/trackbacks/122482.aspx</trackback:ping>
        </item>
        <item>
            <title>TweetMyPage V0.2 - Now with &amp;quot;from TweetMyPage&amp;quot; indicator</title>
            <link>http://geekswithblogs.net/lbugnion/archive/2008/05/29/tweetmypage-v0.2---now-with-quotfrom-tweetmypagequot-indicator.aspx</link>
            <description>&lt;p class="gslb_rsbPParagraph"&gt; As soon as I had my &lt;a href="http://www.galasoft.ch/TweetMyPage/Info.aspx" target="_blank"&gt;info page&lt;/a&gt; online, I asked Twitter to accept TweetMyPage as a Twitter application, and to mark the messages posted with TweetMyPage with "from TweetMyPage". Note for developers: There is a form to fill on the Twitter API page. It's really fast, and one day later I got the answer that it was accepted. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt; From now on, messages posted from TweetMyPage are marked as such: &lt;/p&gt; &lt;div class="gslb_rsbDivImage"&gt; &lt;img src="http://www.galasoft.ch/blogs-all/2008052901.png" alt="posted from TweetMyPage" title="posted from TweetMyPage" /&gt; &lt;/div&gt; &lt;p class="gslb_rsbPParagraph"&gt; I got a couple of testers so far, and already got a few requests for additional features. I am now evaluating how I can modify the application to integrate these new features, and will update TweetMyPage as soon as I got time (in 2018) (just kidding). &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt; TweetMyPage is in beta for the moment, and if you want to try it, I'll be happy to send you an invite (just leave a comment down here or &lt;a href="http://www.galasoft.ch/contact_en.html" target="_blank"&gt;send me an email&lt;/a&gt;. If all goes well, I will make TweetMyPage public next week or so. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122471"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122471" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/lbugnion/aggbug/122471.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://geekswithblogs.net/lbugnion/archive/2008/05/29/tweetmypage-v0.2---now-with-quotfrom-tweetmypagequot-indicator.aspx</guid>
            <pubDate>Thu, 29 May 2008 09:00:35 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/lbugnion/comments/122471.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/lbugnion/archive/2008/05/29/tweetmypage-v0.2---now-with-quotfrom-tweetmypagequot-indicator.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/lbugnion/comments/commentRss/122471.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/lbugnion/services/trackbacks/122471.aspx</trackback:ping>
        </item>
        <item>
            <title>GalaSoft &amp;quot;TweetMyPage&amp;quot; released for tests</title>
            <link>http://geekswithblogs.net/lbugnion/archive/2008/05/28/galasoft-quottweetmypagequot-released-for-tests.aspx</link>
            <description>&lt;p class="gslb_rsbPParagraph"&gt;&lt;a href="http://www.galasoft.ch/TweetMyPage/Info.aspx" target="_blank"&gt;GalaSoft "TweetMyPage"&lt;/a&gt; is a web application allowing you to post to Twitter what you're currently reading in your web browser, on a simple button click. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt;After you install the small "scriptlet" button in your web browser's "bookmarks toolbar" (Firefox) or "Links toolbar" (IE), any time you want to share what you're reading with the world, you can simply click on the "TweetMyPage" button. &lt;/p&gt; &lt;div class="gslb_rsbDivImage"&gt;&lt;img title="TweetMyPage button" alt="TweetMyPage button" src="http://www.galasoft.ch/blogs-all/2008052801.png" /&gt; &lt;/div&gt; &lt;p class="gslb_rsbPParagraph"&gt;If it's the first time in this session that you are posting, you will be asked to enter your Twitter user name and password. After that first time, you will not be asked for it anymore, not until you close your web browser. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt;As a result, a message will be sent in your name to Twitter, for example: &lt;/p&gt; &lt;div class="gslb_rsbDivImage"&gt;&lt;img title="Twitter entry" alt="Twitter entry" src="http://www.galasoft.ch/blogs-all/2008052802.png" /&gt; &lt;/div&gt; &lt;p class="gslb_rsbPParagraph"&gt;When you create the "Bookmark button" in the &lt;a href="http://www.galasoft.ch/TweetMyPage/Info.aspx#Settings" target="_blank"&gt;Settings page&lt;/a&gt;, you can customize the "Reading" prefix that will be posted, as well as a couple of other settings. &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt;TweetMyPage is in beta for the moment, and if you want to try it, I'll be happy to send you an invite (just leave a comment down here or &lt;a href="http://www.galasoft.ch/contact" target="_blank"&gt;send me an email&lt;/a&gt;. If all goes well, I will make TweetMyPage public next week or so. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122457"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122457" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/lbugnion/aggbug/122457.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://geekswithblogs.net/lbugnion/archive/2008/05/28/galasoft-quottweetmypagequot-released-for-tests.aspx</guid>
            <pubDate>Wed, 28 May 2008 19:54:38 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/lbugnion/comments/122457.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/lbugnion/archive/2008/05/28/galasoft-quottweetmypagequot-released-for-tests.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/lbugnion/comments/commentRss/122457.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/lbugnion/services/trackbacks/122457.aspx</trackback:ping>
        </item>
        <item>
            <title>WPF talk this Thursday: "Ultra Rich Interactive Applications"</title>
            <link>http://geekswithblogs.net/lbugnion/archive/2008/05/27/wpf-talk-this-thursday-ultra-rich-interactive-applications.aspx</link>
            <description>&lt;p class="gslb_rsbPParagraph"&gt;
I have been in very much stress lately and hardly had time to post, but I don't forget you, dear readers...
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Anyway, this Thursday, I will be talking in a RIA conference organized by the &lt;a href="http://www.internet-briefing.ch/RiaKonferenz" target="_blank"&gt;Internet Briefing group&lt;/a&gt; here in Zurich, in the World Trade Center. My talk is titled &lt;span style="font-weight:bold;"&gt;"Ultra Rich Interactive Applications with WPF"&lt;/span&gt; and subtitled &lt;span style="font-weight:bold;"&gt;"When Silverlight is not enough..."&lt;/span&gt;. I think it's going to be an interesting talk (but obviously I am partial) about the major differences between WPF and Silverlight, and the added richness that WPF provides. I am a big fan of Silverlight, but I have to admit that it's nice going back to the amazing power of WPF sometimes, without having to worry about "is that feature even implemented in Silverlight"?
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
The talk takes place between 16:30 and 17:30 in the World Trade Center, Leutschenbachstrasse 95, 8050 Zürich. Hoping to see some of you there, maybe!
&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122405"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122405" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/lbugnion/aggbug/122405.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://geekswithblogs.net/lbugnion/archive/2008/05/27/wpf-talk-this-thursday-ultra-rich-interactive-applications.aspx</guid>
            <pubDate>Tue, 27 May 2008 12:47:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/lbugnion/comments/122405.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/lbugnion/archive/2008/05/27/wpf-talk-this-thursday-ultra-rich-interactive-applications.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/lbugnion/comments/commentRss/122405.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/lbugnion/services/trackbacks/122405.aspx</trackback:ping>
        </item>
        <item>
            <title>My resume is now online</title>
            <link>http://geekswithblogs.net/lbugnion/archive/2008/05/10/my-resume-is-now-online.aspx</link>
            <description>&lt;p class="gslb_rsbPParagraph"&gt;I finally did something I wanted to do for a loooooong time: I cleaned up and &lt;a href="http://www.galasoft.ch/resume" target="_blank"&gt;put my resume online&lt;/a&gt; on my website. Note for Beat (my boss), if you read this, don't panic, I am not leaving just right now :) Anyway. For those of you who like to know my (professional) self better, feel free to &lt;a href="http://www.galasoft.ch/resume" target="_blank"&gt;take a look&lt;/a&gt;. If you want a username and password to check my certificates and awards, &lt;a href="http://www.galasoft.ch/contact_en.html" target="_blank"&gt;contact me&lt;/a&gt;. And if you have any comment, give me feedback!! &lt;/p&gt; &lt;p class="gslb_rsbPParagraph"&gt;&lt;a href="http://www.galasoft.ch" target="_new" atomicselection="true"&gt;&lt;img alt="http://www.galasoft.ch" src="http://www.galasoft.ch/images/counter-blog-all.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122029"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=122029" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/lbugnion/aggbug/122029.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://geekswithblogs.net/lbugnion/archive/2008/05/10/my-resume-is-now-online.aspx</guid>
            <pubDate>Fri, 09 May 2008 22:28:08 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/lbugnion/comments/122029.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/lbugnion/archive/2008/05/10/my-resume-is-now-online.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/lbugnion/comments/commentRss/122029.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/lbugnion/services/trackbacks/122029.aspx</trackback:ping>
        </item>
        <item>
            <title>WPF: ListView/GridView minimum and maximum width for a column</title>
            <link>http://geekswithblogs.net/lbugnion/archive/2008/05/06/wpf-listviewgridview-minimum-and-maximum-width-for-a-column.aspx</link>
            <description>&lt;p class="gslb_rsbPParagraph"&gt;
A WPF ListView is a possible replacement for a datagrid, when it doesn't have to support advanced features like grouping or filtering of rows. If you use a ListView in your WPF application, and set the "View" property of this ListView to be a GridView.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
A ListView/GridView even supports features like reordering and resizing columns. Unfortunately, it is not possible to define a minimum or maximum width for the columns. Fortunately, it is not really to do this in the code behind. Let's see how.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
First we need to understand how exactly the resizing of a GridView column works. When a column can be resized, a narrow vertical line appears on the right side of the column. Passing the mouse over this line turns the cursor into a "resize" cursor.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
To find out what exactly this line is made of, we can use a tool like &lt;a href="http://www.blois.us/Snoop/" target="_blank"&gt;Snoop&lt;/a&gt;, or &lt;a href="http://www.codeproject.com/KB/WPF/MoleForWPF.aspx" target="_blank"&gt;Mole&lt;/a&gt;. These tools display the inner structure of a WPF UI, also known as the Visual Tree. For example, in Mole, we can navigate down to our ListView and display the header row's inner structure:
&lt;/p&gt;
&lt;div class="gslb_rsbDivImage"&gt;
&lt;img src="http://www.galasoft.ch/blogs-all/2008050301.png" alt="Header row of a ListView" title="Header row of a ListView" /&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
The feature that is of particular interest to us is the "Thumb" control, named PART_HeaderGripper. This requires some explanations:
&lt;/p&gt;
&lt;ul class="gslb_rsbList"&gt;
&lt;li&gt;
A Drag action is the action through which a control is selected (click-and-hold) and then the mouse is moved. The expected action is usually that the clicked control moves together with the mouse, but other actions may be performed too, for example resizing the columns of a grid, etc...
&lt;/li&gt;
&lt;li&gt;
A Thumb is a small WPF control that can be dragged. It has a collection of events that are used to program what happens when a drag action is performed on the control. For example, the event Thumb.DragDeltaEvent is fired every time that the Thumb is dragged a little.
&lt;br /&gt;Note: A Thumb doesn't really look like anything (well, it does look like a Rectangle!). With the great ability that WPF has to redefine the look&amp;amp;feel of any control, you can make a Thumb look like anything you need. This is why the Thumb control is in the namespace System.Windows.Controls.Primitives: The Thumb is usually used to create other controls, hence the "Primitives".
&lt;/li&gt;
&lt;li&gt;
The makers of WPF controls have for convention to name inner controls of other controls with the "PART_" prefix.
&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Once we know this, we can try to intercept the events raised by the Thumb control named "PART_HeaderGripper", when the ListView's user resizes the columns. Remember, in WPF, events are "routed", we say that they "bubble" up from the control they originate from to the parent and the parent's parent, etc...
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
As a first try, we can add an event handler on the ListView and try to handle the "Thumb.DragDelta" event:
&lt;/p&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListView&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="MyListView"&lt;/span&gt;
          &lt;span class="attr"&gt;IsSynchronizedWithCurrentItem&lt;/span&gt;&lt;span class="kwrd"&gt;="True"&lt;/span&gt;
          &lt;span class="attr"&gt;ItemsSource&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=Items,
                                Mode=Default,
                                Source={StaticResource DataProvider}}"&lt;/span&gt;
          &lt;span class="attr"&gt;Thumb&lt;/span&gt;.&lt;span class="attr"&gt;DragDelta&lt;/span&gt;&lt;span class="kwrd"&gt;="Thumb_DragDelta"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
with:
&lt;/p&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; Thumb_DragDelta(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, &lt;span class="type"&gt;DragDeltaEventArgs&lt;/span&gt; e)
{
  &lt;span class="rem"&gt;// Do nothing for the moment&lt;/span&gt;
  Console.WriteLine(&lt;span class="str"&gt;"Thumb_DragDelta"&lt;/span&gt;);
}
&lt;/div&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Unfortunately, if we place a breakpoint inside the Thumb_DragDelta event handler, it is never reached, not even if you resize any column of the ListView. Why not? Well, when a routed event is handled by any control, it can be marked as "handled". This is done by setting the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.routedeventargs.handled.aspx" target="_blank"&gt;RoutedEventArgs.Handled&lt;/a&gt; property to true inside the event handler.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Fortunately, there is a way to tell the framework that we are interested in an event even if it has been marked as handled. We cannot do this in XAML, however, so just remove the Thumb.DragDelta from the XAML:
&lt;/p&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ListView&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="MyListView"&lt;/span&gt;
          &lt;span class="attr"&gt;IsSynchronizedWithCurrentItem&lt;/span&gt;&lt;span class="kwrd"&gt;="True"&lt;/span&gt;
          &lt;span class="attr"&gt;ItemsSource&lt;/span&gt;&lt;span class="kwrd"&gt;="{Binding Path=Items,
                                Mode=Default,
                                Source={StaticResource DataProvider}}"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Instead, we will add an event handler in code behind. This is one of the few things that you cannot do in XAML!
&lt;/p&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;public Window1()
{
  InitializeComponent();

  MyListView.AddHandler(&lt;span class="type"&gt;Thumb&lt;/span&gt;.DragDeltaEvent,
    new &lt;span class="type"&gt;DragDeltaEventHandler&lt;/span&gt;(Thumb_DragDelta),
    &lt;span class="kwrd"&gt;true&lt;/span&gt;);
}
&lt;/div&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Notice that the last parameter of the AddHandler override is set to "true": This is what indicates that we want to get notified when the DragDelta event "bubbles" to us, even if it has been marked handled before it reaches us. This time, if you run the application and resize a column, the event handler is executed and the breakpoint is reached.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
The last thing we need to do is to forbid the column to be resized under a minimum size, or above a maximum size. To do this, we need to do a few steps:
&lt;/p&gt;
&lt;ul class="gslb_rsbList"&gt;
&lt;li&gt;
Get the Thumb at the origin of the event. This is not the "sender" parameter, because the event handler is placed on the ListView. So even though the routed event originates on the Thumb, the "sender" is actually the ListView. However, there is another way to get the Thumb: The parameter "e" (of type &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.dragdeltaeventargs.aspx" target="_blank"&gt;DragDeltaEventArgs&lt;/a&gt;), like all RoutedEventArgs, contains a property named "&lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.routedeventargs.originalsource.aspx" target="_blank"&gt;OriginalSource&lt;/a&gt;". This is the Thumb we want!
&lt;/li&gt;
&lt;li&gt;
Then, we want to get the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.gridviewcolumnheader.aspx" target="_blank"&gt;GridViewColumnHeader&lt;/a&gt; containing the Thumb. Here too, we need to understand how the visual tree is built. All controls in WPF are essentially lookless, and the look&amp;amp;feel is created in a ControlTemplate, which is separate. We can, however, get the parent's template using the TemplatedParent property.
&lt;/li&gt;
&lt;li&gt;
We're almost there: Once we have the GridViewColumnHeader, all we need to do is get the Column it belongs to (conveniently exposed in the Column property), and set its Width to the minimum respectively maximum value we want to use. Translated in code, this is:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; Thumb_DragDelta(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, &lt;span class="type"&gt;DragDeltaEventArgs&lt;/span&gt; e)
{
  &lt;span class="type"&gt;Thumb&lt;/span&gt; senderAsThumb = e.OriginalSource &lt;span class="kwrd"&gt;as&lt;/span&gt; &lt;span class="type"&gt;Thumb&lt;/span&gt;;
  &lt;span class="type"&gt;GridViewColumnHeader&lt;/span&gt; header
    = senderAsThumb.TemplatedParent &lt;span class="kwrd"&gt;as&lt;/span&gt; &lt;span class="type"&gt;GridViewColumnHeader&lt;/span&gt;;
  &lt;span class="kwrd"&gt;if&lt;/span&gt; (header.Column.ActualWidth &amp;lt; MIN_WIDTH)
  {
    header.Column.Width = MIN_WIDTH;
  }
  &lt;span class="kwrd"&gt;if&lt;/span&gt; (header.Column.ActualWidth &amp;gt; MAX_WIDTH)
  {
    header.Column.Width = MAX_WIDTH;
  }
}
&lt;/div&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
where MIN_WIDTH and MAX_WIDTH are two constants. We could as well use properties to be able to set these values from the outside.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
With this code, the column will be resizable up to a certain limit, and then the Thumb will stop moving. While it requires a good understanding of the inner works of a WPF control, this is not very complicated. It requires some code-behind, however, and cannot be done in pure XAML.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
&lt;a href="http://www.galasoft.ch" target="_new" atomicselection="true"&gt;&lt;img alt="http://www.galasoft.ch" src="http://www.galasoft.ch/images/counter-blog-all.png" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=121934"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=121934" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/lbugnion/aggbug/121934.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://geekswithblogs.net/lbugnion/archive/2008/05/06/wpf-listviewgridview-minimum-and-maximum-width-for-a-column.aspx</guid>
            <pubDate>Tue, 06 May 2008 17:05:12 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/lbugnion/comments/121934.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/lbugnion/archive/2008/05/06/wpf-listviewgridview-minimum-and-maximum-width-for-a-column.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/lbugnion/comments/commentRss/121934.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/lbugnion/services/trackbacks/121934.aspx</trackback:ping>
        </item>
        <item>
            <title>Silverlight: User Controls with events</title>
            <link>http://geekswithblogs.net/lbugnion/archive/2008/04/26/silverlight-user-controls-with-events.aspx</link>
            <description>&lt;div class="gslb_rsbDivFrame"&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
This article is for Silverlight 2 beta 1
&lt;/p&gt;
&lt;/div&gt;
&lt;div class="gslb_rsbDivFrame"&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Update: &lt;a href="http://blogs.ugidotnet.org/ccavalli/Default.aspx" target="_blank"&gt;Corrado Cavalli&lt;/a&gt; translated &lt;a href="#20080426215151download"&gt;the example&lt;/a&gt; in VB.NET. Thanks Corrado!!
&lt;/p&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Apparently, one reader had issues declaring events for the &lt;a href="http://blog.galasoft.ch/archive/2008/04/16/silverlight-packing-user-controls-in-separate-assemblies.aspx" target="_blank"&gt;User Control example&lt;/a&gt; that I posted earlier this week.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
He is programming in VB and unfortunately I don't have a lot of experience with VB.NET, so I first created a working example with C#, and my good friend and fellow MVP Corrado Cavalli translated the example in VB.NET (&lt;a href="#20080426215151download"&gt;see below&lt;/a&gt;).
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
The big difference between WPF and Silverlight regarding events is that Silverlight doesn't support Routed Events (yet?). To be precise, some events are routed (all input events like MouseLeftButtonDown, KeyDown, etc...
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Instead of declaring RoutedEvents in our User Control, we have to resort to standard .NET events then. From a user point of view, it doesn't make a very big difference in the subscribing, but of course these events will not tunnel nor bubble (for a summary of RoutedEvents, bubbling and tunneling in WPF, &lt;a href="http://msdn2.microsoft.com/en-us/library/ms742806.aspx" target="_blank"&gt;read this&lt;/a&gt;).
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
The sample here declares a User Control called LeftRightButton, with two buttons, a LeftButton and a RightButton. it also declares two events, a LeftClick and a RightClick. When the RightButton gets clicked, the UserControls catch this event and raises a RightClick event. The same happens with the LeftButton and the LeftClick event.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Declaring new events for any class requires a Handler declaration (a delegate), and then the event declaration itself.
&lt;/p&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;delegate&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; &lt;span class="type"&gt;ClickHandler&lt;/span&gt;(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, &lt;span class="type"&gt;EventArgs&lt;/span&gt; e);
&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;event&lt;/span&gt; &lt;span class="type"&gt;ClickHandler&lt;/span&gt; RightClick;
&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;event&lt;/span&gt; &lt;span class="type"&gt;ClickHandler&lt;/span&gt; LeftClick;
&lt;/div&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
The next step is to catch the internal click events, and to raise the corresponding "external" event. Note that in this simplified example, I just re-route the RoutedEventArg for the event. Often, you need to declare your own class inheriting EventArgs, for example to pass additional parameters to the event subscriber.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
So if the XAML LeftButton is declared as:
&lt;/p&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Button&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="LeftButton"&lt;/span&gt;
        &lt;span class="attr"&gt;Click&lt;/span&gt;&lt;span class="kwrd"&gt;="LeftButton_Click"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
then we have:
&lt;/p&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; RaiseLeftClick(&lt;span class="type"&gt;RoutedEventArgs&lt;/span&gt; e)
{
  &lt;span class="kwrd"&gt;if&lt;/span&gt; (LeftClick != &lt;span class="kwrd"&gt;null&lt;/span&gt;)
  {
    LeftClick(&lt;span class="kwrd"&gt;this&lt;/span&gt;, e);
  }
}
&lt;/div&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Note how we check if the event is null before we raise it. If no one subscribed to the event, LeftClick will be null, and there is a risk for a NullReferenceException to be thrown.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
Then only thing that we need to do now is catch the internal click event, and raise the corresponding RightClick or LeftClick event.
&lt;/p&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; LeftButton_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, &lt;span class="type"&gt;RoutedEventArgs&lt;/span&gt; e)
{
  RaiseLeftClick(e);
}
&lt;/div&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
The User Control raising these events is located in an external assembly &lt;a href="http://blog.galasoft.ch/archive/2008/04/16/silverlight-packing-user-controls-in-separate-assemblies.aspx" target="_blank"&gt;as shown here&lt;/a&gt;. I use 4 instances of the User Control in a Silverlight application. This way, we demonstrate how to raise new events, how to catch them in another assembly, and how to handle them.
&lt;/p&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;controls:LeftRightButton&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="ButtonTopLeft"&lt;/span&gt;
                          &lt;span class="attr"&gt;RightClick&lt;/span&gt;&lt;span class="kwrd"&gt;="LeftRightButtonButton_RightClick"&lt;/span&gt;
                          &lt;span class="attr"&gt;LeftClick&lt;/span&gt;&lt;span class="kwrd"&gt;="LeftRightButtonButton_LeftClick"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="gslb_rsbDivCodeSection"&gt;
&lt;div class="gslb_rsbDivCode" style="white-space: pre; font-family: Monospace;"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; LeftRightButtonButton_LeftClick(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, &lt;span class="type"&gt;EventArgs&lt;/span&gt; e)
{
  LastEventControlNameTextBlock.Text = (sender &lt;span class="kwrd"&gt;as&lt;/span&gt; &lt;span class="type"&gt;LeftRightButton&lt;/span&gt;).Name;
  LastEventEventNameTextBlock.Text = &lt;span class="str"&gt;"LeftClick"&lt;/span&gt;;
}
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="gslb_rsbDivImage"&gt;
&lt;img src="http://www.galasoft.ch/blogs-all/2008042601.png" alt="4 user controls with events" title="4 user controls with events" /&gt;
&lt;/div&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
&lt;a id="20080426215151download"&gt;&lt;/a&gt;The source code in C# &lt;a href="http://blog.galasoft.ch/mydotnet/articles/resources/article-2008042601/GalaSoft.SL.PackingUserControlWithEvents.zip" target="_blank"&gt;can be downloaded here&lt;/a&gt;.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
The source code in VB.NET (translated by &lt;a href="http://blogs.ugidotnet.org/ccavalli/Default.aspx" target="_blank"&gt;Corrado Cavalli&lt;/a&gt;) &lt;a href="http://blog.galasoft.ch/mydotnet/articles/resources/article-2008042601/GalaSoft.SL.PackingUserControlWithEventsVB.zip" target="_blank"&gt;can be downloaded here&lt;/a&gt;.
&lt;/p&gt;
&lt;p class="gslb_rsbPParagraph"&gt;
&lt;a href="http://www.galasoft.ch" target="_new" atomicselection="true"&gt;&lt;img alt="http://www.galasoft.ch" src="http://www.galasoft.ch/images/counter-blog-all.png" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=121671"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=121671" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/lbugnion/aggbug/121671.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Laurent Bugnion</dc:creator>
            <guid>http://geekswithblogs.net/lbugnion/archive/2008/04/26/silverlight-user-controls-with-events.aspx</guid>
            <pubDate>Sat, 26 Apr 2008 19:59:55 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/lbugnion/comments/121671.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/lbugnion/archive/2008/04/26/silverlight-user-controls-with-events.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/lbugnion/comments/commentRss/121671.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/lbugnion/services/trackbacks/121671.aspx</trackback:ping>
        </item>
    </channel>
</rss>