<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" 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:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Chris Forsberg</title>
    <link>http://www.businessanyplace.net/blog/</link>
    <description>Silverlight, other cool Microsoft-related stuff, and life...</description>
    <language>en-us</language>
    <copyright>Christian Forsberg</copyright>
    <lastBuildDate>Fri, 21 Dec 2007 20:45:12 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>chris@businessanyplace.net</managingEditor>
    <webMaster>chris@businessanyplace.net</webMaster>
    <item>
      <trackback:ping>http://www.businessanyplace.net/blog/Trackback.aspx?guid=41da2d80-face-4614-9e60-707cc9eda916</trackback:ping>
      <pingback:server>http://www.businessanyplace.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.businessanyplace.net/blog/PermaLink,guid,41da2d80-face-4614-9e60-707cc9eda916.aspx</pingback:target>
      <dc:creator>Chris</dc:creator>
      <wfw:comment>http://www.businessanyplace.net/blog/CommentView,guid,41da2d80-face-4614-9e60-707cc9eda916.aspx</wfw:comment>
      <wfw:commentRss>http://www.businessanyplace.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=41da2d80-face-4614-9e60-707cc9eda916</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A couple of weeks ago we had a Wii game session at a friend, and I went from being
a bit skeptical to really having a great time. The graphics wasn't better, the game
ideas wasn't new (tennis, boxing, etc), but the experience was truly great! The idea
of the players actually moving around, has been a dream since I was playing with the
first virtual reality systems ages ago - what happened to all those cool tools? Why
don't we see more of that in everyday applications? I WANT VIRTUAL REALITY NOW!!!
Just hoping someone was listening.
</p>
        <p>
Anyway, when I got home that night, I decided that I should take a closer look. The
thing that interested me most was the Wii remote control, or Wiimote as the insiders
call it. It's really a cool piece of technology with motion sensors and, more interestingly,
a high-res infrared camera. The fact that it speaks Bluetooth doesn't make it worse,
and enables it to be connected to most PCs and other devices. That quickly led me
to think that it shouldn't be to hard to actually code an app for this device, and
of course I was right. I soon found a <a href="http://www.codeplex.com/WiimoteLib" target="_blank">managed
library</a> (again, <a href="http://www.businessanyplace.net/blog/2007/10/31/ILoveNET.aspx" target="_blank">.NET</a>)
that started out as an <a href="http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx" target="_blank">article</a> by <a href="http://www.brianpeek.com/blog/" target="_blank">Brian
Peek</a>, and after browsing some more I discovered that there were people, like <a href="http://www.cs.cmu.edu/~johnny/" target="_blank">Johnny
Chung Lee</a>, doing <a href="http://www.cs.cmu.edu/~johnny/projects/wii/" target="_blank">really
cool stuff</a> with this. Just check out this video... 
</p>
        <embed src="http://www.youtube.com/v/Jd3-eiid-Uw&amp;rel=1&amp;border=1" width="425" height="373" type="application/x-shockwave-flash" wmode="transparent">
        </embed>
        <p>
...and except the actual control (yes, not even the console is needed) and a Bluetooth-enabled
PC, you don't need more than the software. The fact that it's written in C# makes
it even better. I agree with Johnny; when do we see the first games featuring this
possibility. So my question is when we can do this with XBox 360 and XNA?
</p>
        <img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=41da2d80-face-4614-9e60-707cc9eda916" />
      </body>
      <title>Wiirtual Reality</title>
      <guid isPermaLink="false">http://www.businessanyplace.net/blog/PermaLink,guid,41da2d80-face-4614-9e60-707cc9eda916.aspx</guid>
      <link>http://www.businessanyplace.net/blog/2007/12/21/WiirtualReality.aspx</link>
      <pubDate>Fri, 21 Dec 2007 20:45:12 GMT</pubDate>
      <description>&lt;p&gt;
A couple of weeks ago we had a Wii game session at a friend, and I went from being
a bit skeptical to really having a great time. The graphics wasn't better, the game
ideas wasn't new (tennis, boxing, etc), but the experience was truly great! The idea
of the players actually moving around, has been a dream since I was playing with the
first virtual reality systems ages ago - what happened to all those cool tools? Why
don't we see more of that in everyday applications? I WANT VIRTUAL REALITY NOW!!!
Just hoping someone was listening.
&lt;/p&gt;
&lt;p&gt;
Anyway, when I got home that night, I decided that I should take a closer look. The
thing that interested me most was the Wii remote control, or Wiimote as the insiders
call it. It's really a cool piece of technology with motion sensors and, more interestingly,
a high-res infrared camera. The fact that it speaks Bluetooth doesn't make it worse,
and enables it to be connected to most PCs and other devices. That quickly led me
to think that it shouldn't be to hard to actually code an app for this device, and
of course I was right. I soon found a &lt;a href="http://www.codeplex.com/WiimoteLib" target="_blank"&gt;managed
library&lt;/a&gt; (again, &lt;a href="http://www.businessanyplace.net/blog/2007/10/31/ILoveNET.aspx" target="_blank"&gt;.NET&lt;/a&gt;)
that started out as an &lt;a href="http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx" target="_blank"&gt;article&lt;/a&gt; by &lt;a href="http://www.brianpeek.com/blog/" target="_blank"&gt;Brian
Peek&lt;/a&gt;, and after browsing some more I discovered that there were people, like &lt;a href="http://www.cs.cmu.edu/~johnny/" target="_blank"&gt;Johnny
Chung Lee&lt;/a&gt;, doing &lt;a href="http://www.cs.cmu.edu/~johnny/projects/wii/" target="_blank"&gt;really
cool stuff&lt;/a&gt; with this. Just check out this video... 
&lt;/p&gt;
&lt;embed src="http://www.youtube.com/v/Jd3-eiid-Uw&amp;amp;rel=1&amp;amp;border=1" width="425" height="373" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/embed&gt; 
&lt;p&gt;
...and except the actual control (yes, not even the console is needed) and a Bluetooth-enabled
PC, you don't need more than the software. The fact that it's written in C# makes
it even better. I agree with Johnny; when do we see the first games featuring this
possibility. So my question is when we can do this with XBox 360 and XNA?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=41da2d80-face-4614-9e60-707cc9eda916" /&gt;</description>
      <comments>http://www.businessanyplace.net/blog/CommentView,guid,41da2d80-face-4614-9e60-707cc9eda916.aspx</comments>
      <category>Chris</category>
      <category>Code</category>
      <category>Cool Technology</category>
      <category>Life</category>
    </item>
    <item>
      <trackback:ping>http://www.businessanyplace.net/blog/Trackback.aspx?guid=13732226-2c19-4cfd-a020-75134dc63d49</trackback:ping>
      <pingback:server>http://www.businessanyplace.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.businessanyplace.net/blog/PermaLink,guid,13732226-2c19-4cfd-a020-75134dc63d49.aspx</pingback:target>
      <dc:creator>Chris</dc:creator>
      <wfw:comment>http://www.businessanyplace.net/blog/CommentView,guid,13732226-2c19-4cfd-a020-75134dc63d49.aspx</wfw:comment>
      <wfw:commentRss>http://www.businessanyplace.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=13732226-2c19-4cfd-a020-75134dc63d49</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Another weekend of hard work is approaching, and it feels great! I have some cool
technology to look forward to, like a brand new ASP.NET 3.5 architecture design and
Windows Mobile Web Services along with some plain old WinForms and Reporting Services.
The blog title comes from an informal event (read; socialize with beer) every late
Friday afternoon that I heard of today. The term refers to "After Ski" which is a
similar event after a great day of skiing. There are several reason why I think that
it's a great term.
</p>
        <p>
First of all, the idea of relaxing after doing something funny all day, like coding,
is a nice concept. That is really how I see it! I take both pride and joy in my work
as a developer because I create all day long; how many people do that every day? The
creation makes us artists, and that is where most of the pride comes from. Another
aspect I like is the focus on code, and the "code" of our business is exactly that
- code! We are the modern "workers" that create the products that other people use.
We are mostly still craftsmen like most professions a few hundred years ago (shoemakers,
tailors, etc), even if parts of our "industry" is moving towards an approach focusing
more on customization (building with standard products and components). We are the
brain-brawn, and I take pride in that too. In Wikipedia's definition of code you find
"...code is a rule for converting a piece of information...into another form or representation...",
and that is how I see my role as a developer. I convert business information, according
to rules, to another (better) form - applications!
</p>
        <p>
Although I will probably not have much "After Code" this weekend, I think it's a great
concept ;-)...
</p>
        <img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=13732226-2c19-4cfd-a020-75134dc63d49" />
      </body>
      <title>After Code</title>
      <guid isPermaLink="false">http://www.businessanyplace.net/blog/PermaLink,guid,13732226-2c19-4cfd-a020-75134dc63d49.aspx</guid>
      <link>http://www.businessanyplace.net/blog/2007/12/07/AfterCode.aspx</link>
      <pubDate>Fri, 07 Dec 2007 21:05:01 GMT</pubDate>
      <description>&lt;p&gt;
Another weekend of hard work is approaching, and it feels great! I have some cool
technology to look forward to, like a brand new ASP.NET 3.5 architecture design and
Windows Mobile Web Services along with some plain old WinForms and Reporting Services.
The blog title comes from an informal event (read; socialize with beer) every late
Friday afternoon that I heard of today. The term refers to "After Ski" which is a
similar event after a great day of skiing. There are several reason why I think that
it's a great term.
&lt;/p&gt;
&lt;p&gt;
First of all, the idea of relaxing after doing something funny all day, like coding,
is a nice concept. That is really how I see it! I take both pride and joy in my work
as a developer because I create all day long; how many people do that every day? The
creation makes us artists, and that is where most of the pride comes from. Another
aspect I like is the focus on code, and the "code" of our business is exactly that
- code! We are the modern "workers" that create the products that other people use.
We are mostly still craftsmen like most professions a few hundred years ago (shoemakers,
tailors, etc), even if parts of our "industry" is moving towards an approach focusing
more on customization (building with standard products and components). We are the
brain-brawn, and I take pride in that too. In Wikipedia's definition of code you find
"...code is a rule for converting a piece of information...into another form or representation...",
and that is how I see my role as a developer. I convert business information, according
to rules, to another (better) form - applications!
&lt;/p&gt;
&lt;p&gt;
Although I will probably not have much "After Code" this weekend, I think it's a great
concept ;-)...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=13732226-2c19-4cfd-a020-75134dc63d49" /&gt;</description>
      <comments>http://www.businessanyplace.net/blog/CommentView,guid,13732226-2c19-4cfd-a020-75134dc63d49.aspx</comments>
      <category>Chris</category>
      <category>Code</category>
      <category>Life</category>
    </item>
    <item>
      <trackback:ping>http://www.businessanyplace.net/blog/Trackback.aspx?guid=28520a80-441c-4af8-8abc-4dcb819c9032</trackback:ping>
      <pingback:server>http://www.businessanyplace.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.businessanyplace.net/blog/PermaLink,guid,28520a80-441c-4af8-8abc-4dcb819c9032.aspx</pingback:target>
      <dc:creator>Chris</dc:creator>
      <wfw:comment>http://www.businessanyplace.net/blog/CommentView,guid,28520a80-441c-4af8-8abc-4dcb819c9032.aspx</wfw:comment>
      <wfw:commentRss>http://www.businessanyplace.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=28520a80-441c-4af8-8abc-4dcb819c9032</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I had an idea back in the 80's of a portable book that would have a great screen,
that would be connected, that had access to all the books. I thought that the biggest
obstacle was to get the authors (or rather the publishers) to believe in electronic
books, and that the copyrights was my biggest challenge. Hey, I even started the drawings
for the patent (ok, give me some slack, I was young then), but I never actually made
any serious attempt. Then, I bought my first handheld, a <a href="http://en.wikipedia.org/wiki/Casio_Cassiopeia#Cassiopeia_E-10" target="_blank">Casio
Cassiopeia E10</a>, I thought that the screen wasn't great and it wasn't connected
but still, I was amazed. I showed it to my friend Andy, and he was amazed, and that
was almost 10 years ago.
</p>
        <p>
Now, when I look at the <a href="http://amazon.com/kindle" target="_blank">Kindle</a>,
I see that Jeff Bezos has another idea that is far from new, but he has some points.
He aimed for a great screen and he aimed for connectivity. I still think that he missed
out on the first one (even if a bunch of authors say it's great, I'll wait for the
color display ;-)), but he really got it on the second. I agree with <a href="http://blogs.msdn.com/robtiffany/archive/2007/11/20/what-can-we-learn-from-the-new-amazon-kindle.aspx" target="_blank">Rob
Tiffany</a> on all points, but as a WM developer, it's the connectivity that gets
me. I'm tired of reading all the connectivity small print ("...Connectivity and synchronization
may require separately purchased equipment and/or wireless products...") on many <a href="http://www.microsoft.com/windowsmobile/" target="_blank">WM</a> pages.
On an event back in 2000 I asked if Microsoft would enter the operator business because
I believed (and still do) that the operators don't understand what an open wireless
Internet can bring to everyone (it doesn't have to be free, but free us from <a href="http://blog.nerdbank.net/2007/11/verizon-dsl-redirects-bad-url-requests.html" target="_blank">abuse</a>).
I still ask the same question when I see they offer <a href="http://shop.orange.co.uk/shop/show/handset/htc_touch_dual/features" target="_blank">great
devices</a> without specifying the operating system. What is that? If I could reformat
any phone (Nokia, etc) and install WM, they did have to inform me, but now I'm almost
always stuck with what the manufacturer and/or the operator put in there. How could
the mobile phone industry go so wrong?
</p>
        <p>
Please Microsoft, the operators is not doing their job, let us free, get our users
an open Internet...
</p>
        <img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=28520a80-441c-4af8-8abc-4dcb819c9032" />
      </body>
      <title>I Want Connectivity</title>
      <guid isPermaLink="false">http://www.businessanyplace.net/blog/PermaLink,guid,28520a80-441c-4af8-8abc-4dcb819c9032.aspx</guid>
      <link>http://www.businessanyplace.net/blog/2007/11/24/IWantConnectivity.aspx</link>
      <pubDate>Sat, 24 Nov 2007 04:01:20 GMT</pubDate>
      <description>&lt;p&gt;
I had an idea back in the 80's of a portable book that would have a great screen,
that would be connected, that had access to all the books. I thought that the biggest
obstacle was to get the authors (or rather the publishers) to believe in electronic
books, and that the copyrights was my biggest challenge. Hey, I even started the drawings
for the patent (ok, give me some slack, I was young then), but I never actually made
any serious attempt. Then, I bought my first handheld, a &lt;a href="http://en.wikipedia.org/wiki/Casio_Cassiopeia#Cassiopeia_E-10" target="_blank"&gt;Casio
Cassiopeia E10&lt;/a&gt;, I thought that the screen wasn't great and it wasn't connected
but still, I was amazed. I showed it to my friend Andy, and he was amazed, and that
was almost 10 years ago.
&lt;/p&gt;
&lt;p&gt;
Now, when I look at the &lt;a href="http://amazon.com/kindle" target="_blank"&gt;Kindle&lt;/a&gt;,
I see that Jeff Bezos has another idea that is far from new, but he has some points.
He aimed for a great screen and he aimed for connectivity. I still think that he missed
out on the first one (even if a bunch of authors say it's great, I'll wait for the
color display ;-)), but he really got it on the second. I agree with &lt;a href="http://blogs.msdn.com/robtiffany/archive/2007/11/20/what-can-we-learn-from-the-new-amazon-kindle.aspx" target="_blank"&gt;Rob
Tiffany&lt;/a&gt; on all points, but as a WM developer, it's the connectivity that gets
me. I'm tired of reading all the connectivity small print ("...Connectivity and synchronization
may require separately purchased equipment and/or wireless products...") on many &lt;a href="http://www.microsoft.com/windowsmobile/" target="_blank"&gt;WM&lt;/a&gt; pages.
On an event back in 2000 I asked if Microsoft would enter the operator business because
I believed (and still do) that the operators don't understand what an open wireless
Internet can bring to everyone (it doesn't have to be free, but free us from &lt;a href="http://blog.nerdbank.net/2007/11/verizon-dsl-redirects-bad-url-requests.html" target="_blank"&gt;abuse&lt;/a&gt;).
I still ask the same question when I see they offer &lt;a href="http://shop.orange.co.uk/shop/show/handset/htc_touch_dual/features" target="_blank"&gt;great
devices&lt;/a&gt; without specifying the operating system. What is that? If I could reformat
any phone (Nokia, etc) and install WM, they did have to inform me, but now I'm almost
always stuck with what the manufacturer and/or the operator put in there. How could
the mobile phone industry go so wrong?
&lt;/p&gt;
&lt;p&gt;
Please Microsoft, the operators is not doing their job, let us free, get our users
an open Internet...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=28520a80-441c-4af8-8abc-4dcb819c9032" /&gt;</description>
      <comments>http://www.businessanyplace.net/blog/CommentView,guid,28520a80-441c-4af8-8abc-4dcb819c9032.aspx</comments>
      <category>Chris</category>
      <category>Compact Framework</category>
      <category>Life</category>
    </item>
    <item>
      <trackback:ping>http://www.businessanyplace.net/blog/Trackback.aspx?guid=9c2b2249-04dc-49e3-8d52-4f90a1329af3</trackback:ping>
      <pingback:server>http://www.businessanyplace.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.businessanyplace.net/blog/PermaLink,guid,9c2b2249-04dc-49e3-8d52-4f90a1329af3.aspx</pingback:target>
      <dc:creator>Chris</dc:creator>
      <wfw:comment>http://www.businessanyplace.net/blog/CommentView,guid,9c2b2249-04dc-49e3-8d52-4f90a1329af3.aspx</wfw:comment>
      <wfw:commentRss>http://www.businessanyplace.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=9c2b2249-04dc-49e3-8d52-4f90a1329af3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As you may have seen so far, there's a lot of love on my blog ;-)!
</p>
        <p>
Even since I started programming (yes, it was called that back then), I always wanted
to share my apps. It was always a great pleasure to see someone starting up you application
and start trying it out. When I started to work as a developer, it was natural that
my colleges got the code, rather than the binaries, as I wanted feedback both on the
app and the code. Then the code sharing got organized within source control, version
handling, and even configuration management systems. It was even easier to share,
and we worked together on the same code, but I always felt that the tools was a limitation.
I've used everything from raw <a href="http://en.wikipedia.org/wiki/Concurrent_Versions_System" target="_blank">CVS</a> and <a href="http://msdn2.microsoft.com/en-us/vstudio/aa718670.aspx" target="_blank">SourceSafe</a> to <a href="http://www-306.ibm.com/software/awdtools/clearcase/" target="_blank">ClearCase</a>,
and I've had problems with them all.
</p>
        <p>
          <a href="http://www.devbiz.com/teamplain/webaccess/details.aspx">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="388" alt="TeamPlain bug report" hspace="10" src="http://www.businessanyplace.net/blog/content/binary/WindowsLiveWriter/da230e8a6d26_13E22/webplain_3.jpg" width="480" align="left" border="0" />
          </a>
        </p>
        <p>
First of all, they are no fun! For me, code is fun, and I want my code to stay in
a fun place. A place where I can follow its development, its growth, its progress,
and even its problems and issues. When I saw the <a href="http://msdn2.microsoft.com/en-us/teamsystem/aa718934.aspx" target="_blank">TFS</a> the
first time, I thought that Microsoft was on the right track (as usual), and using
it was more fun than before. But still, something was missing, and when <a href="http://www.codeplex.com/" target="_blank">CodePlex</a> came
around, there was an idea of how it could work. Then I saw <a href="http://www.devbiz.com/teamplain/webaccess/details.aspx" target="_blank">TeamPlain</a>.
They put the extra effort in creating a great <a href="http://www.microsoft.com/design/" target="_blank">UX</a>,
and now the code was treated with respect and it was really fun.
</p>
        <p>
Just check out the bug report on the left - that's fun!
</p>
        <p>
I want to follow the progress of my code on a site like this. The fact that it was
built on <a href="http://msdn2.microsoft.com/en-us/sharepoint/" target="_blank">WSS</a> is
even better as it gives me even more "for free" (like free-text searching, site management,
ability to extend and customize it using a standard approach, etc, etc).
</p>
        <p>
Then, when I saw that Microsoft went and bought the creators, and made it available
as a free download called <a href="http://msdn2.microsoft.com/en-us/teamsystem/bb676728.aspx" target="_blank">Team
System Web Access</a> (TSWA), I was in heaven. Even if there's always more to <a href="http://bloggingabout.net/blogs/mglaser/archive/2007/03/30/how-about-one-team-foundation-server-portal-i-had-a-dream.aspx" target="_blank">dream
about</a>, there is already a lot to be grateful about too.
</p>
        <p>
I haven't checked out the new features in VS2008 TFS, but I guess I won't be disappointed
as I suspect that TSWA is already included.
</p>
        <img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=9c2b2249-04dc-49e3-8d52-4f90a1329af3" />
      </body>
      <title>I Love Code</title>
      <guid isPermaLink="false">http://www.businessanyplace.net/blog/PermaLink,guid,9c2b2249-04dc-49e3-8d52-4f90a1329af3.aspx</guid>
      <link>http://www.businessanyplace.net/blog/2007/11/09/ILoveCode.aspx</link>
      <pubDate>Fri, 09 Nov 2007 02:32:45 GMT</pubDate>
      <description>&lt;p&gt;
As you may have seen so far, there's a lot of love on my blog ;-)!
&lt;/p&gt;
&lt;p&gt;
Even since I started programming (yes, it was called that back then), I always wanted
to share my apps. It was always a great pleasure to see someone starting up you application
and start trying it out. When I started to work as a developer, it was natural that
my colleges got the code, rather than the binaries, as I wanted feedback both on the
app and the code. Then the code sharing got organized within source control, version
handling, and even configuration management systems. It was even easier to share,
and we worked together on the same code, but I always felt that the tools was a limitation.
I've used everything from raw &lt;a href="http://en.wikipedia.org/wiki/Concurrent_Versions_System" target="_blank"&gt;CVS&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa718670.aspx" target="_blank"&gt;SourceSafe&lt;/a&gt; to &lt;a href="http://www-306.ibm.com/software/awdtools/clearcase/" target="_blank"&gt;ClearCase&lt;/a&gt;,
and I've had problems with them all.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.devbiz.com/teamplain/webaccess/details.aspx"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="388" alt="TeamPlain bug report" hspace="10" src="http://www.businessanyplace.net/blog/content/binary/WindowsLiveWriter/da230e8a6d26_13E22/webplain_3.jpg" width="480" align="left" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
First of all, they are no fun! For me, code is fun, and I want my code to stay in
a fun place. A place where I can follow its development, its growth, its progress,
and even its problems and issues. When I saw the &lt;a href="http://msdn2.microsoft.com/en-us/teamsystem/aa718934.aspx" target="_blank"&gt;TFS&lt;/a&gt; the
first time, I thought that Microsoft was on the right track (as usual), and using
it was more fun than before. But still, something was missing, and when &lt;a href="http://www.codeplex.com/" target="_blank"&gt;CodePlex&lt;/a&gt; came
around, there was an idea of how it could work. Then I saw &lt;a href="http://www.devbiz.com/teamplain/webaccess/details.aspx" target="_blank"&gt;TeamPlain&lt;/a&gt;.
They put the extra effort in creating a great &lt;a href="http://www.microsoft.com/design/" target="_blank"&gt;UX&lt;/a&gt;,
and now the code was treated with respect and it was really fun.
&lt;/p&gt;
&lt;p&gt;
Just check out the bug report on the left - that's fun!
&lt;/p&gt;
&lt;p&gt;
I want to follow the progress of my code on a site like this. The fact that it was
built on &lt;a href="http://msdn2.microsoft.com/en-us/sharepoint/" target="_blank"&gt;WSS&lt;/a&gt; is
even better as it gives me even more "for free" (like free-text searching, site management,
ability to extend and customize it using a standard approach, etc, etc).
&lt;/p&gt;
&lt;p&gt;
Then, when I saw that Microsoft went and bought the creators, and made it available
as a free download called &lt;a href="http://msdn2.microsoft.com/en-us/teamsystem/bb676728.aspx" target="_blank"&gt;Team
System Web Access&lt;/a&gt; (TSWA), I was in heaven. Even if there's always more to &lt;a href="http://bloggingabout.net/blogs/mglaser/archive/2007/03/30/how-about-one-team-foundation-server-portal-i-had-a-dream.aspx" target="_blank"&gt;dream
about&lt;/a&gt;, there is already a lot to be grateful about too.
&lt;/p&gt;
&lt;p&gt;
I haven't checked out the new features in VS2008 TFS, but I guess I won't be disappointed
as I suspect that TSWA is already included.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=9c2b2249-04dc-49e3-8d52-4f90a1329af3" /&gt;</description>
      <comments>http://www.businessanyplace.net/blog/CommentView,guid,9c2b2249-04dc-49e3-8d52-4f90a1329af3.aspx</comments>
      <category>Chris</category>
      <category>Code</category>
    </item>
    <item>
      <trackback:ping>http://www.businessanyplace.net/blog/Trackback.aspx?guid=b828913a-00c4-4294-8220-d48ae3766e46</trackback:ping>
      <pingback:server>http://www.businessanyplace.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.businessanyplace.net/blog/PermaLink,guid,b828913a-00c4-4294-8220-d48ae3766e46.aspx</pingback:target>
      <dc:creator>Chris</dc:creator>
      <wfw:comment>http://www.businessanyplace.net/blog/CommentView,guid,b828913a-00c4-4294-8220-d48ae3766e46.aspx</wfw:comment>
      <wfw:commentRss>http://www.businessanyplace.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b828913a-00c4-4294-8220-d48ae3766e46</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today, seven years ago, I got my hands on the first beta of .NET Framework 1.0, and
I was really excited. When I attended a partner conference about .NET in late 2000,
I was blown away! 
</p>
        <p>
I had been working with Microsoft technology for year already, but I felt that the
long awaited framework of reusable code for enterprise applications was being created.
I mean that even if both the core Windows API and libraries like MFC all brought productivity,
the new frameworks new capabilities in terms of data access, XML, communication, etc,
was something new and necessary. We could let go of most of the code that we previously
had to design, create, test, and deploy with our own proprietary frameworks. Even
if we did that somewhat unwillingly, it was a good thing. The next amazing thing was
the new language, C#, and I remember that thought; "-Bye, bye, sweet Visual Basic"
who had been my friend for several years. The fact that I had been programming Turbo
Pascal, C, and C++ before probably helped, but I thought that the creation by <a href="http://www.microsoft.com/presspass/exec/techfellow/Hejlsberg/">Anders
Hejlsberg</a> (who also created Turbo Pascal) was exactly what I had been looking
for (combining the best of all languages, including Java). The things that remained
the same, and that was already good, were the operating system (Windows) and the development
environment (Visual Studio). So, the four pillars of a developer's world were there... 
</p>
        <ol>
          <li>
Operating System 
</li>
          <li>
Framework 
</li>
          <li>
Language 
</li>
          <li>
Tools 
</li>
        </ol>
        <p>
...and since that day, I haven't looked back once! 
</p>
        <p>
The great thing now is to see how Microsoft is taking the framework further. As I
have been developing for Windows Mobile devices for some years, I have used the compact
version of the framework. It's quite amazing how much of the full framework that is
there considering the footprint. The framework was not on handheld devices and mobile
phones. The things that are missing in .NET Compact Framework can almost always be
handled in some way (by adding some third-party code, etc). Recently, I have come
in contact with the <a href="http://msdn2.microsoft.com/en-us/embedded/bb278106.aspx">.NET
Micro Framework</a> which is even smaller (yes, <a href="http://blogs.msdn.com/netmfteam/">small
IS beautiful</a>, but still the managed code, the language, and the development tools
that we have grown to adore. Just check out how <a href="http://blogs.msdn.com/mikehall/archive/2007/09/19/micro-framework-invaders.aspx">he
created</a> a basic version of my all-time-favorite game space invaders. The framework
is now in sensors, monitors, aux displays, remote controls, and even in robots. The
next great example is <a href="http://silverlight.net/">Silverlight</a>, which is
actually a C++ implementation of a subset of the full framework. As the other smaller
frameworks, it is focused on having a small footprint, but the new thing here is that
it is now also portable. It works in the most common browsers and on both Windows
and Mac (OS X). Still, the four pillars are the same! 
</p>
        <p>
My conclusion is that after watching the .NET Framework grow, move, and port for seven
years is that we will live with this framework for years to come. It will still change
in many ways, but this is the way to build the software of the future. Bill Gates
was right, again, and I feel secure that my investments in the framework are very
safe. I know that the code I write based on .NET Framework in C# is something that
I can use for many years. 
</p>
        <p>
Again, keep up the great work, Microsoft! 
</p>
        <img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=b828913a-00c4-4294-8220-d48ae3766e46" />
      </body>
      <title>I Love .NET</title>
      <guid isPermaLink="false">http://www.businessanyplace.net/blog/PermaLink,guid,b828913a-00c4-4294-8220-d48ae3766e46.aspx</guid>
      <link>http://www.businessanyplace.net/blog/2007/10/31/ILoveNET.aspx</link>
      <pubDate>Wed, 31 Oct 2007 15:19:54 GMT</pubDate>
      <description>&lt;p&gt;
Today, seven years ago, I got my hands on the first beta of .NET Framework 1.0, and
I was really excited. When I attended a partner conference about .NET in late 2000,
I was blown away! 
&lt;/p&gt;
&lt;p&gt;
I had been working with Microsoft technology for year already, but I felt that the
long awaited framework of reusable code for enterprise applications was being created.
I mean that even if both the core Windows API and libraries like MFC all brought productivity,
the new frameworks new capabilities in terms of data access, XML, communication, etc,
was something new and necessary. We could let go of most of the code that we previously
had to design, create, test, and deploy with our own proprietary frameworks. Even
if we did that somewhat unwillingly, it was a good thing. The next amazing thing was
the new language, C#, and I remember that thought; "-Bye, bye, sweet Visual Basic"
who had been my friend for several years. The fact that I had been programming Turbo
Pascal, C, and C++ before probably helped, but I thought that the creation by &lt;a href="http://www.microsoft.com/presspass/exec/techfellow/Hejlsberg/"&gt;Anders
Hejlsberg&lt;/a&gt; (who also created Turbo Pascal) was exactly what I had been looking
for (combining the best of all languages, including Java). The things that remained
the same, and that was already good, were the operating system (Windows) and the development
environment (Visual Studio). So, the four pillars of a developer's world were there... 
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Operating System 
&lt;/li&gt;
&lt;li&gt;
Framework 
&lt;/li&gt;
&lt;li&gt;
Language 
&lt;/li&gt;
&lt;li&gt;
Tools 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
...and since that day, I haven't looked back once! 
&lt;/p&gt;
&lt;p&gt;
The great thing now is to see how Microsoft is taking the framework further. As I
have been developing for Windows Mobile devices for some years, I have used the compact
version of the framework. It's quite amazing how much of the full framework that is
there considering the footprint. The framework was not on handheld devices and mobile
phones. The things that are missing in .NET Compact Framework can almost always be
handled in some way (by adding some third-party code, etc). Recently, I have come
in contact with the &lt;a href="http://msdn2.microsoft.com/en-us/embedded/bb278106.aspx"&gt;.NET
Micro Framework&lt;/a&gt; which is even smaller (yes, &lt;a href="http://blogs.msdn.com/netmfteam/"&gt;small
IS beautiful&lt;/a&gt;, but still the managed code, the language, and the development tools
that we have grown to adore. Just check out how &lt;a href="http://blogs.msdn.com/mikehall/archive/2007/09/19/micro-framework-invaders.aspx"&gt;he
created&lt;/a&gt; a basic version of my all-time-favorite game space invaders. The framework
is now in sensors, monitors, aux displays, remote controls, and even in robots. The
next great example is &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt;, which is
actually a C++ implementation of a subset of the full framework. As the other smaller
frameworks, it is focused on having a small footprint, but the new thing here is that
it is now also portable. It works in the most common browsers and on both Windows
and Mac (OS X). Still, the four pillars are the same! 
&lt;/p&gt;
&lt;p&gt;
My conclusion is that after watching the .NET Framework grow, move, and port for seven
years is that we will live with this framework for years to come. It will still change
in many ways, but this is the way to build the software of the future. Bill Gates
was right, again, and I feel secure that my investments in the framework are very
safe. I know that the code I write based on .NET Framework in C# is something that
I can use for many years. 
&lt;/p&gt;
&lt;p&gt;
Again, keep up the great work, Microsoft! 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=b828913a-00c4-4294-8220-d48ae3766e46" /&gt;</description>
      <comments>http://www.businessanyplace.net/blog/CommentView,guid,b828913a-00c4-4294-8220-d48ae3766e46.aspx</comments>
      <category>Chris</category>
      <category>Life</category>
    </item>
    <item>
      <trackback:ping>http://www.businessanyplace.net/blog/Trackback.aspx?guid=68eb8581-3f72-4488-9efc-38ae44eb5cfd</trackback:ping>
      <pingback:server>http://www.businessanyplace.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.businessanyplace.net/blog/PermaLink,guid,68eb8581-3f72-4488-9efc-38ae44eb5cfd.aspx</pingback:target>
      <dc:creator>Chris</dc:creator>
      <wfw:comment>http://www.businessanyplace.net/blog/CommentView,guid,68eb8581-3f72-4488-9efc-38ae44eb5cfd.aspx</wfw:comment>
      <wfw:commentRss>http://www.businessanyplace.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=68eb8581-3f72-4488-9efc-38ae44eb5cfd</wfw:commentRss>
      <title>Ink Up Your Web Page</title>
      <guid isPermaLink="false">http://www.businessanyplace.net/blog/PermaLink,guid,68eb8581-3f72-4488-9efc-38ae44eb5cfd.aspx</guid>
      <link>http://www.businessanyplace.net/blog/2007/10/27/InkUpYourWebPage.aspx</link>
      <pubDate>Sat, 27 Oct 2007 01:16:17 GMT</pubDate>
      <description>&lt;p&gt;
The great thing about hosting &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt; plugins
on your web page is that you can load it with any &lt;a href="http://msdn2.microsoft.com/en-us/library/ms747122.aspx"&gt;XAML&lt;/a&gt; (not
just the popular use of video as I've shown in my recent posts). For example, you
can start drawing on this grid... 
&lt;/p&gt;
&lt;script id="inkXaml" type="text/xaml"&gt;&lt;?xml version="1.0"?&gt;
    &lt;Canvas xmlns="http://schemas.microsoft.com/client/2007"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     Loaded="onXamlLoaded"&gt;
        &lt;Image Source="http://www.businessanyplace.net/images/gridpaper.png" Width="300" Height="221"/&gt;
        &lt;InkPresenter x:Name="inkPresenter"
         Background="transparent" Width="300" Height="221" 
         MouseLeftButtonDown="onInkPresenterMouseDown" 
         MouseMove="onInkPresenterMouseMove" 
         MouseLeftButtonUp="onInkPresenterMouseUp"/&gt;
    &lt;/Canvas&gt;
&lt;/script&gt;
&lt;div id="inkHost" style="width: 300px; height: 221px"&gt;
&lt;script type=text/javascript&gt;

    Silverlight.createObjectEx({
        source: "#inkXaml",
        parentElement: document.getElementById("inkHost"),
        id: "inkPlugin",
        properties: {
            width: "100%",
            height: "100%",
            version: "1.0",
            inplaceInstallPrompt:true,
            background: "white",
            isWindowless: false
        },
        events: {}
    });

    var plugin;
    var inkPresenter;
    var stroke = null;

    function onXamlLoaded(sender, args)
    {
         plugin = document.getElementById("inkPlugin");
         inkPresenter = sender.findname("inkPresenter");
    }

    function onInkPresenterMouseDown(sender, eventArgs)
    {
        inkPresenter.CaptureMouse();
        stroke = plugin.content.createFromXaml("&lt;Stroke/&gt;");
        stroke.StylusPoints.AddStylusPoints(
            eventArgs.GetStylusPoints(inkPresenter));
        stroke.DrawingAttributes.Color = "#FF000DDD";
        stroke.DrawingAttributes.Width = 1;
        stroke.DrawingAttributes.Height = 1;
        inkPresenter.Strokes.Add(stroke);
    }

    function onInkPresenterMouseMove(sender, eventArgs)
    {
        if(stroke != null)
           stroke.StylusPoints.AddStylusPoints(eventArgs.GetStylusPoints(inkPresenter));
    }

    function onInkPresenterMouseUp(sender, eventArgs)
    {
       stroke = null;
    }
&lt;/script&gt;
&lt;/div&gt;
&lt;p&gt;
...and this is made possible due to the powerful XAML &lt;strong&gt;InkPresenter&lt;/strong&gt; element.
By adding this markup/code to a web page (provided that the &lt;strong&gt;silverlight.js&lt;/strong&gt; file
is referenced like before, see my &lt;a href="http://www.businessanyplace.net/blog/2007/10/24/EverydaySilverlight.aspx"&gt;earlier
post&lt;/a&gt; on that)... 
&lt;/p&gt;
&lt;p style="BACKGROUND: white"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;id&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="inkXaml"&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;type&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="text/xaml"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;lt;?xml
version=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"1.0"&lt;/span&gt;&lt;span style="COLOR: black"&gt;?&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Canvas xmlns=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"http://schemas.microsoft.com/client/2007"&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlns:x=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"http://schemas.microsoft.com/winfx/2006/xaml"&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Loaded=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"onXamlLoaded"&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;gt;&lt;br&gt;
&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;Image Source=&lt;span style="COLOR: #a31515"&gt;"images/gridpaper.png"&lt;/span&gt;&lt;span style="COLOR: black"&gt; Width=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"300"&lt;/span&gt;&lt;span style="COLOR: black"&gt; Height=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"221"&lt;/span&gt;&lt;span style="COLOR: black"&gt;/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;InkPresenter x:Name=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"inkPresenter"&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Background=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"transparent"&lt;/span&gt;&lt;span style="COLOR: black"&gt; Width=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"300"&lt;/span&gt;&lt;span style="COLOR: black"&gt; Height=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"221"&lt;/span&gt;&lt;span style="COLOR: black"&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MouseLeftButtonDown=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"onInkPresenterMouseDown"&lt;/span&gt;&lt;span style="COLOR: black"&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MouseMove=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"onInkPresenterMouseMove"&lt;/span&gt;&lt;span style="COLOR: black"&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MouseLeftButtonUp=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"onInkPresenterMouseUp"&lt;/span&gt;&lt;span style="COLOR: black"&gt;/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/Canvas&amp;gt;&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;div&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;id&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="inkHost"&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;style&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="width:
300px; height: 221px"&amp;gt;&lt;br&gt;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;type&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=text/javascript&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Silverlight.createObjectEx({&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;source: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"#inkXaml"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parentElement: document.getElementById(&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"inkHost"&lt;/span&gt;&lt;span style="COLOR: black"&gt;),&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;id: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"inkPlugin"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;properties: {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"100%"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"100%"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;version: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"1.0"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;inplaceInstallPrompt:&lt;/span&gt;&lt;span style="COLOR: blue"&gt;true&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"white"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;isWindowless: &lt;/span&gt;&lt;span style="COLOR: blue"&gt;false&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;events: {}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;var&lt;/span&gt;&lt;span style="COLOR: black"&gt; plugin;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;var&lt;/span&gt;&lt;span style="COLOR: black"&gt; inkPresenter;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;var&lt;/span&gt;&lt;span style="COLOR: black"&gt; stroke
= &lt;/span&gt;&lt;span style="COLOR: blue"&gt;null&lt;/span&gt;&lt;span style="COLOR: black"&gt;;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;function&lt;/span&gt;&lt;span style="COLOR: black"&gt; onXamlLoaded(sender,
args)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugin = document.getElementById(&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"inkPlugin"&lt;/span&gt;&lt;span style="COLOR: black"&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inkPresenter = sender.findname(&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"inkPresenter"&lt;/span&gt;&lt;span style="COLOR: black"&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;function&lt;/span&gt;&lt;span style="COLOR: black"&gt; onInkPresenterMouseDown(sender,
eventArgs)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;inkPresenter.CaptureMouse();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;stroke = plugin.content.createFromXaml(&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"&amp;lt;Stroke/&amp;gt;"&lt;/span&gt;&lt;span style="COLOR: black"&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;stroke.StylusPoints.AddStylusPoints(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;eventArgs.GetStylusPoints(inkPresenter));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;stroke.DrawingAttributes.Color = &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"#FF000DDD"&lt;/span&gt;&lt;span style="COLOR: black"&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;stroke.DrawingAttributes.Width = 1;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;stroke.DrawingAttributes.Height =
1;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;inkPresenter.Strokes.Add(stroke);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;function&lt;/span&gt;&lt;span style="COLOR: black"&gt; onInkPresenterMouseMove(sender,
eventArgs)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt;&lt;span style="COLOR: black"&gt;(stroke
!= &lt;/span&gt;&lt;span style="COLOR: blue"&gt;null&lt;/span&gt;&lt;span style="COLOR: black"&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stroke.StylusPoints.AddStylusPoints(eventArgs.GetStylusPoints(inkPresenter));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;function&lt;/span&gt;&lt;span style="COLOR: black"&gt; onInkPresenterMouseUp(sender,
eventArgs)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stroke = &lt;/span&gt;&lt;span style="COLOR: blue"&gt;null&lt;/span&gt;&lt;span style="COLOR: black"&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;div&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
...you have made it possibility for your users to make handwritten notes on your page.
The XAML is fairly simple with the background (grid) behind the &lt;strong&gt;InkPresenter&lt;/strong&gt;,
and the scripts are used to create new &lt;strong&gt;Stroke&lt;/strong&gt; elements for each mouse
gesture (down, moves, up). 
&lt;/p&gt;
&lt;p&gt;
There are many things you can do with this, and for a more extensive sample, check
out the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=894980A3-C8D5-4ABB-AE62-C3965A27AB14"&gt;Silverlight
Ink SDK Sample&lt;/a&gt;. For example, as the ink (strokes) is basically XAML, it's definitely
possible to save in on the server side (why not in a database). As the strokes are
created on the client, this would require some functionality to upload the ink, probably
implemented using scripts that communicate with the web server (a.k.a. &lt;a href="http://en.wikipedia.org/wiki/AJAX"&gt;AJAX&lt;/a&gt;).
This means that you could create everything from a simple inking guestbook to capturing
ink feedback on a CAD drawing (note that the grid above is an image file). I haven't
seen much of this in real-world applications yet, but there is a sample called &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=BE89F4B0-3E83-4363-A1DE-EB764FF46B4C"&gt;Journal
Note Converter Sample&lt;/a&gt; which allows you to convert a Microsoft Journal note to
a complete Silverlight application that allow further inking. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=68eb8581-3f72-4488-9efc-38ae44eb5cfd" /&gt;</description>
      <comments>http://www.businessanyplace.net/blog/CommentView,guid,68eb8581-3f72-4488-9efc-38ae44eb5cfd.aspx</comments>
      <category>Chris</category>
      <category>Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://www.businessanyplace.net/blog/Trackback.aspx?guid=2f199afa-8a60-4cf7-8c9b-4317a5e69cc3</trackback:ping>
      <pingback:server>http://www.businessanyplace.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.businessanyplace.net/blog/PermaLink,guid,2f199afa-8a60-4cf7-8c9b-4317a5e69cc3.aspx</pingback:target>
      <dc:creator>Chris</dc:creator>
      <wfw:comment>http://www.businessanyplace.net/blog/CommentView,guid,2f199afa-8a60-4cf7-8c9b-4317a5e69cc3.aspx</wfw:comment>
      <wfw:commentRss>http://www.businessanyplace.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=2f199afa-8a60-4cf7-8c9b-4317a5e69cc3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've realized that I made a mistake in my <a href="http://www.businessanyplace.net/blog/2007/10/24/EverydaySilverlight.aspx">previous
post</a> about the simple video player. The problem with my video player was that
it started loading the video when the web page was loaded. That is something users
with low bandwidth are not so happy about (especially when the video is about 10 MB,
as in this case). If you change the XAML to contain a play button like this... 
</p>
        <p>
          <span style="font-family:Courier New; font-size:10pt">
            <span style="color:blue">&lt;</span>
            <span style="color:#a31515">Canvas</span>
            <span style="color:blue">
            </span>
            <span style="color:red">xmlns</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">http://schemas.microsoft.com/client/2007</span>
            <span style="color:black">"<br /></span>
            <span style="color:blue">
            </span>
            <span style="color:red">xmlns:x</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">http://schemas.microsoft.com/winfx/2006/xaml</span>
            <span style="color:black">"</span>
            <span style="color:blue">&gt;<br />
&lt;</span>
            <span style="color:#a31515">MediaElement</span>
            <span style="color:blue">
            </span>
            <span style="color:red">x:Name</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">Video</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Width</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">420</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Height</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">236</span>
            <span style="color:black">"<br /></span>
            <span style="color:blue">
            </span>
            <span style="color:red">MouseLeftButtonDown</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">onVideoMouseDown</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">MediaEnded</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">onVideoMediaEnded</span>
            <span style="color:black">"</span>
            <span style="color:blue">/&gt;<br />
&lt;</span>
            <span style="color:#a31515">Canvas</span>
            <span style="color:blue">
            </span>
            <span style="color:red">x:Name</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">PlayButton</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Canvas.Left</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">185</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Canvas.Top</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">93</span>
            <span style="color:black">"<br /></span>
            <span style="color:blue">
            </span>
            <span style="color:red">Width</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">50</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Height</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">50</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">MouseLeftButtonDown</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">onButtonMouseDown</span>
            <span style="color:black">"</span>
            <span style="color:blue">&gt;<br />
&lt;</span>
            <span style="color:#a31515">Rectangle</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Fill</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">#3F000000</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Stroke</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">#FF000000</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">StrokeThickness</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">2</span>
            <span style="color:black">"<br /></span>
            <span style="color:blue">
            </span>
            <span style="color:red">RadiusX</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">10</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">RadiusY</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">10</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Width</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">50</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Height</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">50</span>
            <span style="color:black">"</span>
            <span style="color:blue">/&gt;<br />
&lt;</span>
            <span style="color:#a31515">Path</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Fill</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">#FF000000</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Stretch</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">Fill</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Stroke</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">#FFD10000</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">StrokeThickness</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">0</span>
            <span style="color:black">"<br /></span>
            <span style="color:blue">
            </span>
            <span style="color:red">Width</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">24</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Height</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">34</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Canvas.Left</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">15</span>
            <span style="color:black">"<br /></span>
            <span style="color:blue">
            </span>
            <span style="color:red">Canvas.Top</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">8</span>
            <span style="color:black">"</span>
            <span style="color:blue">
            </span>
            <span style="color:red">Data</span>
            <span style="color:blue">=</span>
            <span style="color:black">"</span>
            <span style="color:blue">M224,184
L224,208 240,196.37082 z</span>
            <span style="color:black">"</span>
            <span style="color:blue">/&gt;<br />
&lt;/</span>
            <span style="color:#a31515">Canvas</span>
            <span style="color:blue">&gt;<br />
&lt;/</span>
            <span style="color:#a31515">Canvas</span>
            <span style="color:blue">&gt;</span>
          </span>
        </p>
        <p>
...and add the following script... 
</p>
        <p>
          <span style="font-family:Courier New; font-size:10pt">
            <span style="color:blue">function</span>
            <span style="color:black"> onButtonMouseDown(sender,
eventArgs)<br />
{<br />
sender.findName(</span>
            <span style="color:#a31515">"PlayButton"</span>
            <span style="color:black">).Visibility=</span>
            <span style="color:#a31515">"Collapsed"</span>
            <span style="color:black">;<br />
sender.findName(</span>
            <span style="color:#a31515">"Video"</span>
            <span style="color:black">).Source=</span>
            <span style="color:#a31515">"http://www.businessanyplace.net/chris/slintro.wmv"</span>
            <span style="color:black">;<br />
}</span>
          </span>
        </p>
        <p style="background: white">
...you will be much better off because the only thing that is loaded initially is
the XAML. When the play button is clicked, it will disappear, and the video starts
loading and playing. The play/pause functionality is still the same as before. I have
updated my <a href="http://www.businessanyplace.net/blog/2007/10/24/EverydaySilverlight.aspx">previous
post</a> now, so I hope all you with lower bandwidth will be happy about that.
</p>
        <img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=2f199afa-8a60-4cf7-8c9b-4317a5e69cc3" />
      </body>
      <title>Silverlight Video Play Button</title>
      <guid isPermaLink="false">http://www.businessanyplace.net/blog/PermaLink,guid,2f199afa-8a60-4cf7-8c9b-4317a5e69cc3.aspx</guid>
      <link>http://www.businessanyplace.net/blog/2007/10/25/SilverlightVideoPlayButton.aspx</link>
      <pubDate>Thu, 25 Oct 2007 17:44:22 GMT</pubDate>
      <description>&lt;p&gt;
I've realized that I made a mistake in my &lt;a href="http://www.businessanyplace.net/blog/2007/10/24/EverydaySilverlight.aspx"&gt;previous
post&lt;/a&gt; about the simple video player. The problem with my video player was that
it started loading the video when the web page was loaded. That is something users
with low bandwidth are not so happy about (especially when the video is about 10 MB,
as in this case). If you change the XAML to contain a play button like this... 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Canvas&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;xmlns&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;http://schemas.microsoft.com/client/2007&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;xmlns:x&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;br /&gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;MediaElement&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;x:Name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;Video&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Width&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;420&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Height&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;236&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;MouseLeftButtonDown&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;onVideoMouseDown&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;MediaEnded&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;onVideoMediaEnded&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;/&amp;gt;&lt;br /&gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Canvas&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;x:Name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;PlayButton&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Canvas.Left&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;185&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Canvas.Top&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;93&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Width&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;50&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Height&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;50&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;MouseLeftButtonDown&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;onButtonMouseDown&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;br /&gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Rectangle&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Fill&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;#3F000000&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Stroke&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;#FF000000&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;StrokeThickness&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;2&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;RadiusX&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;10&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;RadiusY&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;10&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Width&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;50&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Height&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;50&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;/&amp;gt;&lt;br /&gt;
&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;Path&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Fill&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;#FF000000&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Stretch&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;Fill&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Stroke&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;#FFD10000&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;StrokeThickness&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;0&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Width&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;24&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Height&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;34&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Canvas.Left&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;15&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Canvas.Top&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;8&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt; &lt;/span&gt;&lt;span style="color:red"&gt;Data&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;M224,184
L224,208 240,196.37082 z&lt;/span&gt;&lt;span style="color:black"&gt;"&lt;/span&gt;&lt;span style="color:blue"&gt;/&amp;gt;&lt;br /&gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Canvas&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;br /&gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;Canvas&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
...and add the following script... 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;function&lt;/span&gt;&lt;span style="color:black"&gt; onButtonMouseDown(sender,
eventArgs)&lt;br /&gt;
{&lt;br /&gt;
sender.findName(&lt;/span&gt;&lt;span style="color:#a31515"&gt;"PlayButton"&lt;/span&gt;&lt;span style="color:black"&gt;).Visibility=&lt;/span&gt;&lt;span style="color:#a31515"&gt;"Collapsed"&lt;/span&gt;&lt;span style="color:black"&gt;;&lt;br /&gt;
sender.findName(&lt;/span&gt;&lt;span style="color:#a31515"&gt;"Video"&lt;/span&gt;&lt;span style="color:black"&gt;).Source=&lt;/span&gt;&lt;span style="color:#a31515"&gt;"http://www.businessanyplace.net/chris/slintro.wmv"&lt;/span&gt;&lt;span style="color:black"&gt;;&lt;br /&gt;
}&lt;/span&gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p style="background: white"&gt;
...you will be much better off because the only thing that is loaded initially is
the XAML. When the play button is clicked, it will disappear, and the video starts
loading and playing. The play/pause functionality is still the same as before. I have
updated my &lt;a href="http://www.businessanyplace.net/blog/2007/10/24/EverydaySilverlight.aspx"&gt;previous
post&lt;/a&gt; now, so I hope all you with lower bandwidth will be happy about that.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=2f199afa-8a60-4cf7-8c9b-4317a5e69cc3" /&gt;</description>
      <comments>http://www.businessanyplace.net/blog/CommentView,guid,2f199afa-8a60-4cf7-8c9b-4317a5e69cc3.aspx</comments>
      <category>Chris</category>
      <category>Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://www.businessanyplace.net/blog/Trackback.aspx?guid=a5cd484e-99d2-46e2-98d3-71bd9f17aa80</trackback:ping>
      <pingback:server>http://www.businessanyplace.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.businessanyplace.net/blog/PermaLink,guid,a5cd484e-99d2-46e2-98d3-71bd9f17aa80.aspx</pingback:target>
      <dc:creator>Chris</dc:creator>
      <wfw:comment>http://www.businessanyplace.net/blog/CommentView,guid,a5cd484e-99d2-46e2-98d3-71bd9f17aa80.aspx</wfw:comment>
      <wfw:commentRss>http://www.businessanyplace.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a5cd484e-99d2-46e2-98d3-71bd9f17aa80</wfw:commentRss>
      <title>Everyday Silverlight</title>
      <guid isPermaLink="false">http://www.businessanyplace.net/blog/PermaLink,guid,a5cd484e-99d2-46e2-98d3-71bd9f17aa80.aspx</guid>
      <link>http://www.businessanyplace.net/blog/2007/10/24/EverydaySilverlight.aspx</link>
      <pubDate>Wed, 24 Oct 2007 01:40:46 GMT</pubDate>
      <description>&lt;p&gt;
One of the coolest &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt; features is the
ease with which you can use media on your web site. There are numerous quickstarts,
tutorials, videos, and webcasts to show you how easy you can build your own video
player. The power of Silverlight can be released with a little &lt;a href="http://msdn2.microsoft.com/en-us/library/ms747122.aspx"&gt;XAML&lt;/a&gt;,
and here is one of the simplest XAML video players around: 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;MediaElement&lt;/span&gt;&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="http://schemas.microsoft.com/client/2007"&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: red"&gt;Source&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="COLOR: black"&gt;"&lt;/span&gt;&lt;span style="COLOR: blue"&gt;http://www.businessanyplace.net/chris/slintro.wmv&lt;/span&gt;&lt;span style="COLOR: black"&gt;"&lt;/span&gt;&lt;span style="COLOR: blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
You need a Silverlight control on your page to make it work, but it works. If you
have .NET Framework 3.0 installed, you can change the namespace to... 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;MediaElement&lt;/span&gt;&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: red"&gt;Source&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="COLOR: black"&gt;"&lt;/span&gt;&lt;span style="COLOR: blue"&gt;http://www.businessanyplace.net/chris/slintro.wmv&lt;/span&gt;&lt;span style="COLOR: black"&gt;"&lt;/span&gt;&lt;span style="COLOR: blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
...place it in a file (e.g. videoplayer.xaml), and then you can open it file in Internet
Explorer. That's already cool, but let's get back to how to use it with Silverlight. 
&lt;/p&gt;
&lt;p&gt;
In a minimal approach, there is only one file that you need to put up on your web
site, it's called &lt;strong&gt;silverlight.js&lt;/strong&gt; and comes with the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=FB7900DB-4380-4B0F-BB95-0BAEC714EE17"&gt;Silverlight
SDK&lt;/a&gt;. It basically takes care of creating the actual Silverlight plugin on the
web page (with support for PC or Mac and the most common browsers). Put this file
in a script directory (e.g. "js" below you web page root). 
&lt;/p&gt;
&lt;p&gt;
With that file in place, you are ready to create your first web page that include
video playback, and it can look like this... 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;html&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;xmlns&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="http://www.w3.org/1999/xhtml"&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;xml&lt;/span&gt;&lt;span style="COLOR: blue"&gt;:&lt;/span&gt;&lt;span style="COLOR: red"&gt;lang&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="en"&amp;gt;&lt;br&gt;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;head&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;title&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="COLOR: black"&gt;Video
Player&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;title&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;type&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="text/javascript"&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;src&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="js/Silverlight.js"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;head&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;body&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;p&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="COLOR: black"&gt;Here's
some text, and here comes the video...&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;p&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;type&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="text/xaml"&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;id&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="firstXaml"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;lt;?xml
version=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"1.0"&lt;/span&gt;&lt;span style="COLOR: black"&gt;?&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;MediaElement xmlns=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"http://schemas.microsoft.com/client/2007"&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;xmlns:x=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"http://schemas.microsoft.com/winfx/2006/xaml"&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Source=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"http://www.businessanyplace.net/chris/slintro.wmv"&lt;/span&gt;&lt;span style="COLOR: black"&gt; x:Name=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"Video"&lt;/span&gt;&lt;span style="COLOR: black"&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AutoPlay=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"false"&lt;/span&gt;&lt;span style="COLOR: black"&gt; MouseLeftButtonDown=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"onVideoMouseDown"&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MediaEnded=&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"onVideoMediaEnded"&lt;/span&gt;&lt;span style="COLOR: black"&gt;/&amp;gt;&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;div&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;style&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="width:
208; height: 160;"&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;id&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="firstHost"&amp;gt;&lt;br&gt;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: black"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;type&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="text/javascript"&amp;gt;&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Silverlight.createObjectEx({&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;source: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"#firstXaml"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parentElement: document.getElementById(&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"firstHost"&lt;/span&gt;&lt;span style="COLOR: black"&gt;),&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;id: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"firstPlugIn"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;properties: {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"100%"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"100%"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;version: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"1.0"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;inplaceInstallPrompt:&lt;/span&gt;&lt;span style="COLOR: blue"&gt;true&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;background: &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"white"&lt;/span&gt;&lt;span style="COLOR: black"&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;isWindowless: &lt;/span&gt;&lt;span style="COLOR: blue"&gt;false&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;events: {}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;function&lt;/span&gt;&lt;span style="COLOR: black"&gt; onVideoMouseDown(sender,
eventArgs)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt;&lt;span style="COLOR: black"&gt;(sender.CurrentState
!= &lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;"Playing"&lt;/span&gt;&lt;span style="COLOR: black"&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sender.Play();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;else&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: black"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sender.Pause();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;function&lt;/span&gt;&lt;span style="COLOR: black"&gt; onVideoMediaEnded(sender,
eventArgs)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sender.stop();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;div&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;p&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;span style="COLOR: black"&gt;...and
some more text!&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;p&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;body&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;br&gt;
&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;html&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
...and note how I reference the script file mentioned above. The actual XAML is located
in the &lt;strong&gt;firstXaml&lt;/strong&gt; script tag, and you can see that I've added some
attributes like a name (required by the event functions), event handlers, etc. Then
I just call the &lt;strong&gt;Silverlight.createObjectEx&lt;/strong&gt; method with the name of
the XAML (script) tag, the script (div) host, and the name of this instance of the
plugin. I have also added two methods to support the video playback by allowing the
click of the mouse on the video player to play and pause, and to automatic rewind
of the video when it's done. Note that there's nothing preventing me from adding various
videos on the same page as long as I give all parts unique names. 
&lt;/p&gt;
&lt;p&gt;
Using this approach I have included the cool intro video from the REMIX 2007 event
(click below to play/pause the video). 
&lt;/p&gt;
&lt;script id=firstXaml type=text/xaml&gt;&lt;?xml version="1.0"?&gt;
    &lt;Canvas xmlns="http://schemas.microsoft.com/client/2007"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
        &lt;MediaElement x:Name="Video" Width="420" Height="236"
         MouseLeftButtonDown="onVideoMouseDown" MediaEnded="onVideoMediaEnded"/&gt;
        &lt;Canvas x:Name="PlayButton" Canvas.Left="185" Canvas.Top="93"
         Width="50" Height="50" MouseLeftButtonDown="onButtonMouseDown"&gt;
            &lt;Rectangle Fill="#3F000000" Stroke="#FF000000" StrokeThickness="2"
             RadiusX="10" RadiusY="10" Width="50" Height="50"/&gt;
            &lt;Path Fill="#FF000000" Stretch="Fill" Stroke="#FFD10000" StrokeThickness="0"
             Width="24" Height="34" Canvas.Left="15"
             Canvas.Top="8" Data="M224,184 L224,208 240,196.37082 z"/&gt;
        &lt;/Canvas&gt;
    &lt;/Canvas&gt;
&lt;/script&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; BORDER-TOP: gray 1px solid; BORDER-LEFT: gray 1px solid; WIDTH: 420px; BORDER-BOTTOM: gray 1px solid"&gt;
&lt;div id=firstHost style="WIDTH: 420px; HEIGHT: 236px"&gt;
&lt;script type=text/javascript&gt;
    Silverlight.createObjectEx({
        source: "#firstXaml",
        parentElement: document.getElementById("firstHost"),
        id: "firstPlugIn",
        properties: {
            width: "100%",
            height: "100%",
            version: "1.0",
            inplaceInstallPrompt:true,
            background: "white",
            isWindowless: false
        },
        events: {}
    });

    function onVideoMouseDown(sender, eventArgs)
    {
        if(sender.CurrentState != "Playing")
            sender.Play();
        else
            sender.Pause();
        }

    function onVideoMediaEnded(sender, eventArgs)
    {
        sender.Stop();
    }

    function onButtonMouseDown(sender, eventArgs)
    {
        sender.Visibility="Collapsed";
        sender.findName("Video").Source="http://www.businessanyplace.net/chris/slintro.wmv";
    }
&lt;/script&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=a5cd484e-99d2-46e2-98d3-71bd9f17aa80" /&gt;</description>
      <comments>http://www.businessanyplace.net/blog/CommentView,guid,a5cd484e-99d2-46e2-98d3-71bd9f17aa80.aspx</comments>
      <category>Chris</category>
      <category>Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://www.businessanyplace.net/blog/Trackback.aspx?guid=7904a6b3-de11-4070-b06d-988554170f90</trackback:ping>
      <pingback:server>http://www.businessanyplace.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.businessanyplace.net/blog/PermaLink,guid,7904a6b3-de11-4070-b06d-988554170f90.aspx</pingback:target>
      <dc:creator>Chris</dc:creator>
      <wfw:comment>http://www.businessanyplace.net/blog/CommentView,guid,7904a6b3-de11-4070-b06d-988554170f90.aspx</wfw:comment>
      <wfw:commentRss>http://www.businessanyplace.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=7904a6b3-de11-4070-b06d-988554170f90</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've always liked the software from Microsoft, and especially Windows. Ever since
I started my first Windows program back in 85, I knew they were on the right track.
A few years I was frustrated because I had to code in character-based tools while
my users had a better UX with the mouse, and when I could use Windows to do my work,
I was delighted – and I still am! I don't know why many in our business are so afraid
of being Microsoft "fan boys". Why not? It's a very successful company, and that success
mostly comes from creating great software. I'm not ashamed; I'm a Microsoft fan boy! 
</p>
        <p>
          <img align="right" src="http://www.businessanyplace.net/blog/content/binary/101907_1934_ILoveVista1.jpg" alt="" />Just
take a look at my desktop on the right. Every morning when I turn on my computer I
smile. I just love what I do (and of course my amazing woman on the photos from Greece
this summer), and there are very few days that I don't want to write some code to
create something amazing. My dear friend, Andy, always tell the story of his school
paper about programming he named "Happiness", and I know exactly what he means. I'm
happy! What I like most with the stuff from Microsoft is that I can use the same tools
to program everything from a fat server to a tiny mobile phone (I'll never buy a phone
where I can't install my apps). 
</p>
        <p>
Even if some of my friends and colleges complain about Vista (they say that they will
go back to XP, that Microsoft is offering free "downgrades", maybe buy a Mac, etc),
I haven't regretted installing it one second. I know it's not as fast as it should
be, that all the drivers aren't there yet, and I say: -What's new? I have been installing
new versions of Windows (and other OSs) for 20 years, and it's always the same thing.
The hardware manufacturers need to catch up, that's all. I use Vista mostly for development,
and I think almost everything works great. If I need to try something odd, I fire
up a VPC image, and if it crashes with a blue screen, I only smile again, and restart
it. 
</p>
        <p>
All in all, I haven't had any major problems, I have been able to sync my mobile devices
with Windows Media Center since the installation (I guess I'm lucky). But I'm also
very careful (I always unpack installation to see what they do before I run them)
and I follow a golden rule: don't install too much of the other's stuff. I was forced
to install QuickTime by the Expression Media setup, and after that my IE couldn't
even show .png files, so QuickTime had to go. I haven't even thought about unnecessary
things like Firefox (I have a great browser in IE) or RealPlayer (I have a great media
player), and I'm more surprised when some actually work, like Skype, Nero, etc. I'm
actually amazed that my favorite imaging tool, Image Composer (now 10 years since
its last version), actually runs very well on my 64-bit Vista! I even like the name
"Vista" as it means "View" in most of the Latin languages, and that's the feeling
I get every morning as I turn on my laptop! 
</p>
        <p>
Keep up the great work, Microsoft! 
</p>
        <img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=7904a6b3-de11-4070-b06d-988554170f90" />
      </body>
      <title>I Love Vista!</title>
      <guid isPermaLink="false">http://www.businessanyplace.net/blog/PermaLink,guid,7904a6b3-de11-4070-b06d-988554170f90.aspx</guid>
      <link>http://www.businessanyplace.net/blog/2007/10/19/ILoveVista.aspx</link>
      <pubDate>Fri, 19 Oct 2007 19:34:47 GMT</pubDate>
      <description>&lt;p&gt;
I've always liked the software from Microsoft, and especially Windows. Ever since
I started my first Windows program back in 85, I knew they were on the right track.
A few years I was frustrated because I had to code in character-based tools while
my users had a better UX with the mouse, and when I could use Windows to do my work,
I was delighted – and I still am! I don't know why many in our business are so afraid
of being Microsoft "fan boys". Why not? It's a very successful company, and that success
mostly comes from creating great software. I'm not ashamed; I'm a Microsoft fan boy! 
&lt;/p&gt;
&lt;p&gt;
&lt;img align="right" src="http://www.businessanyplace.net/blog/content/binary/101907_1934_ILoveVista1.jpg" alt="" /&gt;Just
take a look at my desktop on the right. Every morning when I turn on my computer I
smile. I just love what I do (and of course my amazing woman on the photos from Greece
this summer), and there are very few days that I don't want to write some code to
create something amazing. My dear friend, Andy, always tell the story of his school
paper about programming he named "Happiness", and I know exactly what he means. I'm
happy! What I like most with the stuff from Microsoft is that I can use the same tools
to program everything from a fat server to a tiny mobile phone (I'll never buy a phone
where I can't install my apps). 
&lt;/p&gt;
&lt;p&gt;
Even if some of my friends and colleges complain about Vista (they say that they will
go back to XP, that Microsoft is offering free "downgrades", maybe buy a Mac, etc),
I haven't regretted installing it one second. I know it's not as fast as it should
be, that all the drivers aren't there yet, and I say: -What's new? I have been installing
new versions of Windows (and other OSs) for 20 years, and it's always the same thing.
The hardware manufacturers need to catch up, that's all. I use Vista mostly for development,
and I think almost everything works great. If I need to try something odd, I fire
up a VPC image, and if it crashes with a blue screen, I only smile again, and restart
it. 
&lt;/p&gt;
&lt;p&gt;
All in all, I haven't had any major problems, I have been able to sync my mobile devices
with Windows Media Center since the installation (I guess I'm lucky). But I'm also
very careful (I always unpack installation to see what they do before I run them)
and I follow a golden rule: don't install too much of the other's stuff. I was forced
to install QuickTime by the Expression Media setup, and after that my IE couldn't
even show .png files, so QuickTime had to go. I haven't even thought about unnecessary
things like Firefox (I have a great browser in IE) or RealPlayer (I have a great media
player), and I'm more surprised when some actually work, like Skype, Nero, etc. I'm
actually amazed that my favorite imaging tool, Image Composer (now 10 years since
its last version), actually runs very well on my 64-bit Vista! I even like the name
"Vista" as it means "View" in most of the Latin languages, and that's the feeling
I get every morning as I turn on my laptop! 
&lt;/p&gt;
&lt;p&gt;
Keep up the great work, Microsoft! 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=7904a6b3-de11-4070-b06d-988554170f90" /&gt;</description>
      <comments>http://www.businessanyplace.net/blog/CommentView,guid,7904a6b3-de11-4070-b06d-988554170f90.aspx</comments>
      <category>Chris</category>
      <category>Life</category>
    </item>
    <item>
      <trackback:ping>http://www.businessanyplace.net/blog/Trackback.aspx?guid=2dd33946-7710-4573-988e-4a477253e63f</trackback:ping>
      <pingback:server>http://www.businessanyplace.net/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.businessanyplace.net/blog/PermaLink,guid,2dd33946-7710-4573-988e-4a477253e63f.aspx</pingback:target>
      <dc:creator>Chris</dc:creator>
      <wfw:comment>http://www.businessanyplace.net/blog/CommentView,guid,2dd33946-7710-4573-988e-4a477253e63f.aspx</wfw:comment>
      <wfw:commentRss>http://www.businessanyplace.net/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=2dd33946-7710-4573-988e-4a477253e63f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Even if the <a href="http://silverlight.net/">Silverlight</a><a href="http://msdn2.microsoft.com/en-us/library/bb232870.aspx">Downloader</a> is
fairly tolerant when it comes to handling unsuccessful downloads of files from the
server, it can be inefficient to use that tolerance. As an example, I was playing
around with <a href="http://weblogs.asp.net/mschwarz/">Michael Schwarz</a>'s excellent <a href="http://silverlight.schwarz-interactive.de/ex04/default.html">Surface
sample</a> (<a href="http://silverlight.schwarz-interactive.de/ex04.zip">source code</a>)
and wanted it to handle an arbitrary number of pictures. I therefore created a general
purpose method that uses the <a href="http://msdn2.microsoft.com/en-us/library/bb404702.aspx">BrowserHttpWebRequest</a> (only
link I could find) from the <a href="http://msdn2.microsoft.com/en-us/library/bb404702.aspx">System.Windows.Browser.Net</a> namespace,
and it looks like this... 
</p>
        <p>
          <span style="font-family:Courier New">
            <span style="font-size:10pt">
              <span style="color:blue">public</span>
              <span style="color:black">
              </span>
              <span style="color:blue">static</span>
              <span style="color:black">
              </span>
              <span style="color:blue">bool</span>
              <span style="color:black"> CheckUri(</span>
              <span style="color:#2b91af">Uri</span>
              <span style="color:black"> uri)<br />
{<br /></span>
              <span style="color:blue">bool</span>
              <span style="color:black"> exists = </span>
              <span style="color:blue">false</span>
              <span style="color:black">;<br /><br /></span>
              <span style="color:blue">try<br /></span>
              <span style="color:black"> {<br /></span>
              <span style="color:#2b91af">HttpWebRequest</span>
              <span style="color:black"> request
= (</span>
              <span style="color:#2b91af">HttpWebRequest</span>
              <span style="color:black">) </span>
              <span style="color:blue">new</span>
              <span style="color:black">
              </span>
              <span style="color:#2b91af">BrowserHttpWebRequest</span>
              <span style="color:black">(uri);<br />
request.Credentials = </span>
              <span style="color:blue">new</span>
              <span style="color:black"> NetworkCredential(</span>
              <span style="color:#a31515">"Username"</span>
              <span style="color:black">, </span>
              <span style="color:#a31515">"P@ssw0rd"</span>
              <span style="color:black">);<br />
request.PreAuthenticate = </span>
              <span style="color:blue">true</span>
              <span style="color:black">;<br /></span>
              <span style="color:#2b91af">HttpWebResponse</span>
              <span style="color:black"> response
= (</span>
              <span style="color:#2b91af">HttpWebResponse</span>
              <span style="color:black">)request.GetResponse();<br />
request.Abort();<br /><br /></span>
              <span style="color:green">// Success?<br /></span>
              <span style="color:black">
              </span>
              <span style="color:blue">if</span>
              <span style="color:black">(response.StatusCode
== </span>
              <span style="color:#2b91af">HttpStatusCode</span>
              <span style="color:black">.OK)<br />
exists = </span>
              <span style="color:blue">true</span>
              <span style="color:black">;<br />
response.GetResponseStream().Close();<br />
}<br /></span>
              <span style="color:blue">catch</span>
              <span style="color:black">(</span>
              <span style="color:#2b91af">WebException</span>
              <span style="color:black"> we)<br />
{<br />
exists = </span>
              <span style="color:blue">false</span>
              <span style="color:black">;<br />
}<br /></span>
              <span style="color:blue">catch</span>
              <span style="color:black">(</span>
              <span style="color:#2b91af">Exception</span>
              <span style="color:black"> ex)<br />
{<br />
exists = </span>
              <span style="color:blue">false</span>
              <span style="color:black">;<br />
}<br /></span>
              <span style="color:blue">return</span>
              <span style="color:black"> exists;<br />
}</span>
            </span>
          </span>
        </p>
        <p>
...and with this placed in a helper class (e.g. NetHelper), the check can be made
with code similar to... 
</p>
        <p>
          <span style="font-family:Courier New; font-size:10pt">
            <span style="color:blue">for</span>
            <span style="color:black">(</span>
            <span style="color:blue">int</span>
            <span style="color:black"> i
= 1; i &lt; 100; i++)<br />
{<br /></span>
            <span style="color:blue">if</span>
            <span style="color:black">(</span>
            <span style="color:#2b91af">NetHelper</span>
            <span style="color:black">.CheckUri(</span>
            <span style="color:blue">new</span>
            <span style="color:black">
            </span>
            <span style="color:#2b91af">Uri</span>
            <span style="color:black">(</span>
            <span style="color:#2b91af">HtmlPage</span>
            <span style="color:black">.DocumentUri, </span>
            <span style="color:#a31515">"photo"</span>
            <span style="color:black"> +
i.ToString(</span>
            <span style="color:#a31515">"00"</span>
            <span style="color:black">)
+ </span>
            <span style="color:#a31515">".jpg"</span>
            <span style="color:black">)))<br /></span>
            <span style="color:green">// File exists, so get it using Downloader<br /></span>
            <span style="color:black">
            </span>
            <span style="color:blue">else<br /></span>
            <span style="color:black">
            </span>
            <span style="color:blue">break</span>
            <span style="color:black">;<br />
}</span>
          </span>
        </p>
        <p>
...assuming that the photos are named in sequence "photo01.jpg", "photo02.jpg", and
so on. The loop will download photos until one in the sequence is missing. 
</p>
        <p>
Note that the CheckUri method can be used to check connectivity in general. Of course,
you can check that you have a network connection using the <a href="http://msdn2.microsoft.com/en-us/library/ms918360.aspx">InternetGetConnectedState</a> Windows
API or even that a specific domain exist with <a href="http://msdn2.microsoft.com/en-us/library/ms143998(vs.80).aspx">Dns.GetHostEntry</a>,
but if you want to check for a specific file (e.g. the .asmx file of an XML Web Service),
the CheckUri method is very useful. 
</p>
        <p>
BTW, a tip is to set the <a href="http://msdn2.microsoft.com/en-us/library/bb412401.aspx">inplaceInstallPrompt</a> parameter
to true to speed up your users installation of the <a href="http://silverlight.net/">Silverlight</a> plugin. 
</p>
        <p>
        </p>
        <img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=2dd33946-7710-4573-988e-4a477253e63f" />
      </body>
      <title>Check If File Exist on Web Server with Silverlight</title>
      <guid isPermaLink="false">http://www.businessanyplace.net/blog/PermaLink,guid,2dd33946-7710-4573-988e-4a477253e63f.aspx</guid>
      <link>http://www.businessanyplace.net/blog/2007/10/18/CheckIfFileExistOnWebServerWithSilverlight.aspx</link>
      <pubDate>Thu, 18 Oct 2007 23:36:27 GMT</pubDate>
      <description>&lt;p&gt;
Even if the &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt; &lt;a href="http://msdn2.microsoft.com/en-us/library/bb232870.aspx"&gt;Downloader&lt;/a&gt; is
fairly tolerant when it comes to handling unsuccessful downloads of files from the
server, it can be inefficient to use that tolerance. As an example, I was playing
around with &lt;a href="http://weblogs.asp.net/mschwarz/"&gt;Michael Schwarz&lt;/a&gt;'s excellent &lt;a href="http://silverlight.schwarz-interactive.de/ex04/default.html"&gt;Surface
sample&lt;/a&gt; (&lt;a href="http://silverlight.schwarz-interactive.de/ex04.zip"&gt;source code&lt;/a&gt;)
and wanted it to handle an arbitrary number of pictures. I therefore created a general
purpose method that uses the &lt;a href="http://msdn2.microsoft.com/en-us/library/bb404702.aspx"&gt;BrowserHttpWebRequest&lt;/a&gt; (only
link I could find) from the &lt;a href="http://msdn2.microsoft.com/en-us/library/bb404702.aspx"&gt;System.Windows.Browser.Net&lt;/a&gt; namespace,
and it looks like this... 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Courier New"&gt;&lt;span style="font-size:10pt"&gt;&lt;span style="color:blue"&gt;public&lt;/span&gt;&lt;span style="color:black"&gt; &lt;/span&gt;&lt;span style="color:blue"&gt;static&lt;/span&gt;&lt;span style="color:black"&gt; &lt;/span&gt;&lt;span style="color:blue"&gt;bool&lt;/span&gt;&lt;span style="color:black"&gt; CheckUri(&lt;/span&gt;&lt;span style="color:#2b91af"&gt;Uri&lt;/span&gt;&lt;span style="color:black"&gt; uri)&lt;br /&gt;
{&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt;bool&lt;/span&gt;&lt;span style="color:black"&gt; exists = &lt;/span&gt;&lt;span style="color:blue"&gt;false&lt;/span&gt;&lt;span style="color:black"&gt;;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt;try&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:black"&gt; {&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:#2b91af"&gt;HttpWebRequest&lt;/span&gt;&lt;span style="color:black"&gt; request
= (&lt;/span&gt;&lt;span style="color:#2b91af"&gt;HttpWebRequest&lt;/span&gt;&lt;span style="color:black"&gt;) &lt;/span&gt;&lt;span style="color:blue"&gt;new&lt;/span&gt;&lt;span style="color:black"&gt; &lt;/span&gt;&lt;span style="color:#2b91af"&gt;BrowserHttpWebRequest&lt;/span&gt;&lt;span style="color:black"&gt;(uri);&lt;br /&gt;
request.Credentials = &lt;/span&gt;&lt;span style="color:blue"&gt;new&lt;/span&gt;&lt;span style="color:black"&gt; NetworkCredential(&lt;/span&gt;&lt;span style="color:#a31515"&gt;"Username"&lt;/span&gt;&lt;span style="color:black"&gt;, &lt;/span&gt;&lt;span style="color:#a31515"&gt;"P@ssw0rd"&lt;/span&gt;&lt;span style="color:black"&gt;);&lt;br /&gt;
request.PreAuthenticate = &lt;/span&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;span style="color:black"&gt;;&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:#2b91af"&gt;HttpWebResponse&lt;/span&gt;&lt;span style="color:black"&gt; response
= (&lt;/span&gt;&lt;span style="color:#2b91af"&gt;HttpWebResponse&lt;/span&gt;&lt;span style="color:black"&gt;)request.GetResponse();&lt;br /&gt;
request.Abort();&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:green"&gt;// Success?&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:black"&gt; &lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;span style="color:black"&gt;(response.StatusCode
== &lt;/span&gt;&lt;span style="color:#2b91af"&gt;HttpStatusCode&lt;/span&gt;&lt;span style="color:black"&gt;.OK)&lt;br /&gt;
exists = &lt;/span&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;span style="color:black"&gt;;&lt;br /&gt;
response.GetResponseStream().Close();&lt;br /&gt;
}&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt;catch&lt;/span&gt;&lt;span style="color:black"&gt;(&lt;/span&gt;&lt;span style="color:#2b91af"&gt;WebException&lt;/span&gt;&lt;span style="color:black"&gt; we)&lt;br /&gt;
{&lt;br /&gt;
exists = &lt;/span&gt;&lt;span style="color:blue"&gt;false&lt;/span&gt;&lt;span style="color:black"&gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt;catch&lt;/span&gt;&lt;span style="color:black"&gt;(&lt;/span&gt;&lt;span style="color:#2b91af"&gt;Exception&lt;/span&gt;&lt;span style="color:black"&gt; ex)&lt;br /&gt;
{&lt;br /&gt;
exists = &lt;/span&gt;&lt;span style="color:blue"&gt;false&lt;/span&gt;&lt;span style="color:black"&gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt;return&lt;/span&gt;&lt;span style="color:black"&gt; exists;&lt;br /&gt;
}&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
...and with this placed in a helper class (e.g. NetHelper), the check can be made
with code similar to... 
&lt;/p&gt;
&lt;p&gt;
&lt;span style="font-family:Courier New; font-size:10pt"&gt;&lt;span style="color:blue"&gt;for&lt;/span&gt;&lt;span style="color:black"&gt;(&lt;/span&gt;&lt;span style="color:blue"&gt;int&lt;/span&gt;&lt;span style="color:black"&gt; i
= 1; i &amp;lt; 100; i++)&lt;br /&gt;
{&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:blue"&gt;if&lt;/span&gt;&lt;span style="color:black"&gt;(&lt;/span&gt;&lt;span style="color:#2b91af"&gt;NetHelper&lt;/span&gt;&lt;span style="color:black"&gt;.CheckUri(&lt;/span&gt;&lt;span style="color:blue"&gt;new&lt;/span&gt;&lt;span style="color:black"&gt; &lt;/span&gt;&lt;span style="color:#2b91af"&gt;Uri&lt;/span&gt;&lt;span style="color:black"&gt;(&lt;/span&gt;&lt;span style="color:#2b91af"&gt;HtmlPage&lt;/span&gt;&lt;span style="color:black"&gt;.DocumentUri, &lt;/span&gt;&lt;span style="color:#a31515"&gt;"photo"&lt;/span&gt;&lt;span style="color:black"&gt; +
i.ToString(&lt;/span&gt;&lt;span style="color:#a31515"&gt;"00"&lt;/span&gt;&lt;span style="color:black"&gt;)
+ &lt;/span&gt;&lt;span style="color:#a31515"&gt;".jpg"&lt;/span&gt;&lt;span style="color:black"&gt;)))&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:green"&gt;// File exists, so get it using Downloader&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:black"&gt; &lt;/span&gt;&lt;span style="color:blue"&gt;else&lt;br /&gt;
&lt;/span&gt;&lt;span style="color:black"&gt; &lt;/span&gt;&lt;span style="color:blue"&gt;break&lt;/span&gt;&lt;span style="color:black"&gt;;&lt;br /&gt;
}&lt;/span&gt;&lt;/span&gt; 
&lt;/p&gt;
&lt;p&gt;
...assuming that the photos are named in sequence "photo01.jpg", "photo02.jpg", and
so on. The loop will download photos until one in the sequence is missing. 
&lt;/p&gt;
&lt;p&gt;
Note that the CheckUri method can be used to check connectivity in general. Of course,
you can check that you have a network connection using the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms918360.aspx"&gt;InternetGetConnectedState&lt;/a&gt; Windows
API or even that a specific domain exist with &lt;a href="http://msdn2.microsoft.com/en-us/library/ms143998(vs.80).aspx"&gt;Dns.GetHostEntry&lt;/a&gt;,
but if you want to check for a specific file (e.g. the .asmx file of an XML Web Service),
the CheckUri method is very useful. 
&lt;/p&gt;
&lt;p&gt;
BTW, a tip is to set the &lt;a href="http://msdn2.microsoft.com/en-us/library/bb412401.aspx"&gt;inplaceInstallPrompt&lt;/a&gt; parameter
to true to speed up your users installation of the &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt; plugin. 
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.businessanyplace.net/blog/aggbug.ashx?id=2dd33946-7710-4573-988e-4a477253e63f" /&gt;</description>
      <comments>http://www.businessanyplace.net/blog/CommentView,guid,2dd33946-7710-4573-988e-4a477253e63f.aspx</comments>
      <category>Chris</category>
      <category>Silverlight</category>
    </item>
  </channel>
</rss>