<?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>Building a Better User Experience - Web 2.0</title>
    <link>http://www.mindfusioncorp.com/weblog/</link>
    <description>A weblog authored by Keith Rome, with a focus on the User Experience.</description>
    <language>en-us</language>
    <copyright>Keith Rome</copyright>
    <lastBuildDate>Thu, 31 Jan 2008 03:33:45 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>krome@wintellect.com</managingEditor>
    <webMaster>krome@wintellect.com</webMaster>
    <item>
      <trackback:ping>http://www.mindfusioncorp.com/weblog/Trackback.aspx?guid=f0a81bc2-0d28-42cc-9436-4ed8bad5279d</trackback:ping>
      <pingback:server>http://www.mindfusioncorp.com/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mindfusioncorp.com/weblog/PermaLink,guid,f0a81bc2-0d28-42cc-9436-4ed8bad5279d.aspx</pingback:target>
      <dc:creator>Keith Rome</dc:creator>
      <wfw:comment>http://www.mindfusioncorp.com/weblog/CommentView,guid,f0a81bc2-0d28-42cc-9436-4ed8bad5279d.aspx</wfw:comment>
      <wfw:commentRss>http://www.mindfusioncorp.com/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=f0a81bc2-0d28-42cc-9436-4ed8bad5279d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yes, you read that right. Silverlight 1.0 - <em>as in unmanaged JavaScript</em> -
and 3D.
</p>
        <p>
Last week I was reminded of the <a href="http://www.codeplex.com/FarseerPhysics">FarSeer
Physics engine for XNA and Silverlight 2.0</a>. I have a strange fascination for 3D
software - stemming back from the years when I was a beta tester and plugin developer
for <a href="http://www.caligari.com/default.asp">Caligari trueSpace 3D</a> - so I
decided to poke around in the source code from CodePlex to see what they were doing.
Turns out it was just mostly linear algebra and some simple mechanics - things I remembered
working with many years ago before the age of managed runtimes and rich visual APIs.
Back then we had to do all the heavy lifting with highly optimized C++ routines and
drawing directly to an HWND. But things are different now, and what seemed incredibly
hard in years past really didn't seem all that hard anymore.
</p>
        <p>
So I was inspired I guess.
</p>
        <p>
I know I could have started with the FarSeer code, and built upon that using C# and
targeting the managed runtime. But oh no - that was too easy! I figured that if it
can be done using simple trig and a solid model design, I bet I could make it work
in JavaScript. After all, JavaScript's Math intrinsic object supports Sin() and Cos(),
extensible objects, and arrays - and at the end of the day, that's all one really
needs in order to create a 3D runtime. Sure, it involves a fair amount of matrix operations
and dot-products and cross-products, but all those things can be learned by reading
up on <a href="http://en.wikipedia.org/wiki/Vector_%28spatial%29">Wikipedia</a> these
days (or <a href="http://www.mathreference.com/">mathreference.com</a>).
</p>
        <p>
So with that, I set out to create an unmanaged 3D visualization engine for Silverlight...
</p>
        <p>
I am making the code freely available and have already published out to CodePlex here: <a title="http://www.codeplex.com/polygraph3d" href="http://www.codeplex.com/polygraph3d">http://www.codeplex.com/polygraph3d</a></p>
        <p>
My efforts so far are looking pretty good (I think). Over the course of about 8 hours
of coding and testing, I have the basics working. I can create a 3-dimensional <a href="http://en.wikipedia.org/wiki/Polyhedron">polyhedron</a> (a
mesh if you will), and I can display the object in a Silverlight Canvas. I can apply
scaling, rotations, and positioning of the polyhedra, and I can also build complex
objects using polyhedron groups, each of which has its own local scaling/rotation/position
transforms. It also supports a movable camera and performs rudimentary perspective
correction as well as small optimizations for backface-culling. It currently only
supports simple brushes for the object faces - I would like to implement a real texture
mapping system, but that will require some very creative use of image skewing to pull
it off.
</p>
        <p>
I have <a href="http://demo.wintellect.com/polygraph3d/default.html">a test page</a> up
that demos a simple 3D cube that you can move around the virtual viewport space...
</p>
        <p>
          <a href="http://demo.wintellect.com/polygraph3d/default.html">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="217" alt="image" src="http://www.mindfusioncorp.com/weblog/content/binary/PolyGraph3DMaking3DhappenwithSilverlig.0_13C6D/image.png" width="288" border="0" />
          </a>
        </p>
        <p>
For sure, it is a very simple demo. Clicking the red, green, and blue axis bars will
move the cube around. The "spin" button introduces a gradual rotation around the Y
axis... but since my rotation transform code is currently broken, the effect isn't
quite what I had in mind. Hopefully I will figure that particular bug out soon.
</p>
        <p>
One major hurdle I encountered was the fact that Silverlight does not let you draw
directly on a Canvas, nor does it let you create your own controls. This posed a problem
since I wanted to display things that simply could not be expressed using 2D XAML.
I "solved" this problem by performing all of the mathematics needed to project the
3D scene into a 2D viewport, and then I use the vertex data from the projected mesh
to build a series of 2D Path elements. It was indeed a dirty trick - but hey, sometimes
you just have to make do with the capabilities of the platform.
</p>
        <img width="0" height="0" src="http://www.mindfusioncorp.com/weblog/aggbug.ashx?id=f0a81bc2-0d28-42cc-9436-4ed8bad5279d" />
      </body>
      <title>PolyGraph3D: Making 3D happen with Silverlight 1.0!</title>
      <guid isPermaLink="false">http://www.mindfusioncorp.com/weblog/PermaLink,guid,f0a81bc2-0d28-42cc-9436-4ed8bad5279d.aspx</guid>
      <link>http://www.mindfusioncorp.com/weblog/2008/01/31/PolyGraph3DMaking3DHappenWithSilverlight10.aspx</link>
      <pubDate>Thu, 31 Jan 2008 03:33:45 GMT</pubDate>
      <description>&lt;p&gt;
Yes, you read that right. Silverlight 1.0 - &lt;em&gt;as in unmanaged JavaScript&lt;/em&gt; -
and 3D.
&lt;/p&gt;
&lt;p&gt;
Last week I was reminded of the &lt;a href="http://www.codeplex.com/FarseerPhysics"&gt;FarSeer
Physics engine for XNA and Silverlight 2.0&lt;/a&gt;. I have a strange fascination for 3D
software - stemming back from the years when I was a beta tester and plugin developer
for &lt;a href="http://www.caligari.com/default.asp"&gt;Caligari trueSpace 3D&lt;/a&gt; - so I
decided to poke around in the source code from CodePlex to see what they were doing.
Turns out it was just mostly linear algebra and some simple mechanics - things I remembered
working with many years ago before the age of managed runtimes and rich visual APIs.
Back then we had to do all the heavy lifting with highly optimized C++ routines and
drawing directly to an HWND. But things are different now, and what seemed incredibly
hard in years past really didn't seem all that hard anymore.
&lt;/p&gt;
&lt;p&gt;
So I was inspired I guess.
&lt;/p&gt;
&lt;p&gt;
I know I could have started with the FarSeer code, and built upon that using C# and
targeting the managed runtime. But oh no - that was too easy! I figured that if it
can be done using simple trig and a solid model design, I bet I could make it work
in JavaScript. After all, JavaScript's Math intrinsic object supports Sin() and Cos(),
extensible objects, and arrays - and at the end of the day, that's all one really
needs in order to create a 3D runtime. Sure, it involves a fair amount of matrix operations
and dot-products and cross-products, but all those things can be learned by reading
up on &lt;a href="http://en.wikipedia.org/wiki/Vector_%28spatial%29"&gt;Wikipedia&lt;/a&gt; these
days (or &lt;a href="http://www.mathreference.com/"&gt;mathreference.com&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
So with that, I set out to create an unmanaged 3D visualization engine for Silverlight...
&lt;/p&gt;
&lt;p&gt;
I am making the code freely available and have already published out to CodePlex here: &lt;a title="http://www.codeplex.com/polygraph3d" href="http://www.codeplex.com/polygraph3d"&gt;http://www.codeplex.com/polygraph3d&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
My efforts so far are looking pretty good (I think). Over the course of about 8 hours
of coding and testing, I have the basics working. I can create a 3-dimensional &lt;a href="http://en.wikipedia.org/wiki/Polyhedron"&gt;polyhedron&lt;/a&gt; (a
mesh if you will), and I can display the object in a Silverlight Canvas. I can apply
scaling, rotations, and positioning of the polyhedra, and I can also build complex
objects using polyhedron groups, each of which has its own local scaling/rotation/position
transforms. It also supports a movable camera and performs rudimentary perspective
correction as well as small optimizations for backface-culling. It currently only
supports simple brushes for the object faces - I would like to implement a real texture
mapping system, but that will require some very creative use of image skewing to pull
it off.
&lt;/p&gt;
&lt;p&gt;
I have &lt;a href="http://demo.wintellect.com/polygraph3d/default.html"&gt;a test page&lt;/a&gt; up
that demos a simple 3D cube that you can move around the virtual viewport space...
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://demo.wintellect.com/polygraph3d/default.html"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="217" alt="image" src="http://www.mindfusioncorp.com/weblog/content/binary/PolyGraph3DMaking3DhappenwithSilverlig.0_13C6D/image.png" width="288" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
For sure, it is a very simple demo. Clicking the red, green, and blue axis bars will
move the cube around. The "spin" button introduces a gradual rotation around the Y
axis... but since my rotation transform code is currently broken, the effect isn't
quite what I had in mind. Hopefully I will figure that particular bug out soon.
&lt;/p&gt;
&lt;p&gt;
One major hurdle I encountered was the fact that Silverlight does not let you draw
directly on a Canvas, nor does it let you create your own controls. This posed a problem
since I wanted to display things that simply could not be expressed using 2D XAML.
I "solved" this problem by performing all of the mathematics needed to project the
3D scene into a 2D viewport, and then I use the vertex data from the projected mesh
to build a series of 2D Path elements. It was indeed a dirty trick - but hey, sometimes
you just have to make do with the capabilities of the platform.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.mindfusioncorp.com/weblog/aggbug.ashx?id=f0a81bc2-0d28-42cc-9436-4ed8bad5279d" /&gt;</description>
      <comments>http://www.mindfusioncorp.com/weblog/CommentView,guid,f0a81bc2-0d28-42cc-9436-4ed8bad5279d.aspx</comments>
      <category>.NET</category>
      <category>General</category>
      <category>Silverlight</category>
      <category>Web 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.mindfusioncorp.com/weblog/Trackback.aspx?guid=6a776eeb-8caa-4e90-800e-d05db67598b1</trackback:ping>
      <pingback:server>http://www.mindfusioncorp.com/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mindfusioncorp.com/weblog/PermaLink,guid,6a776eeb-8caa-4e90-800e-d05db67598b1.aspx</pingback:target>
      <dc:creator>Keith Rome</dc:creator>
      <wfw:comment>http://www.mindfusioncorp.com/weblog/CommentView,guid,6a776eeb-8caa-4e90-800e-d05db67598b1.aspx</wfw:comment>
      <wfw:commentRss>http://www.mindfusioncorp.com/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=6a776eeb-8caa-4e90-800e-d05db67598b1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Popper! is a simple Silverlight puzzle game. I wrote it as an exercise of my own skill
with the platform, but then decided it was a rather fun (at least for a little while...)
little game, so I am sharing it with the rest of the developer community. Popper!
is written against Silverlight 1.1 alpha, and is mostly in C#, although the initial
splash screen is done using unmanaged javaScript (yes, on purpose).
</p>
        <p>
I will be walking through the innards of Popper! at the <a title="Atlanta Cutting Edge .NET" href="http://www.atlantace.com/" target="_blank">Atlanta
Cutting Edge .NET User Group</a> meeting tonight. So if you will be attending, then
come check it out. Or if you just want to kill some time at "work" today... then play
with it a little and let me know how it goes (good or bad)...
</p>
        <p>
          <a title="Popper!" href="http://www.mindfusioncorp.com/popper/" target="_blank">http://www.mindfusioncorp.com/popper/</a>
        </p>
        <p>
I know of one minor bug so far: if you try to click around while a set of bubbles
is in the process of "popping", then an error is raised internally, and the game pretty
much stops working. I just haven't had the time to get that bug addressed yet.
</p>
        <p>
          <a href="http://www.mindfusioncorp.com/weblog/content/binary/Popper_25A4/image04.png" atomicselection="true">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="235" src="http://www.mindfusioncorp.com/weblog/content/binary/Popper_25A4/image0_thumb2.png" width="379" border="0" />
          </a>
        </p>
        <p>
I intend to post the source for this sometime after this month's meeting. Pretty much
that equates to "when I have time to do it".
</p>
        <img width="0" height="0" src="http://www.mindfusioncorp.com/weblog/aggbug.ashx?id=6a776eeb-8caa-4e90-800e-d05db67598b1" />
      </body>
      <title>Popper!</title>
      <guid isPermaLink="false">http://www.mindfusioncorp.com/weblog/PermaLink,guid,6a776eeb-8caa-4e90-800e-d05db67598b1.aspx</guid>
      <link>http://www.mindfusioncorp.com/weblog/2007/07/02/Popper.aspx</link>
      <pubDate>Mon, 02 Jul 2007 06:40:42 GMT</pubDate>
      <description>&lt;p&gt;
Popper! is a simple Silverlight puzzle game. I wrote it as an exercise of my own skill
with the platform, but then decided it was a rather fun (at least for a little while...)
little game, so I am sharing it with the rest of the developer community. Popper!
is written against Silverlight 1.1 alpha, and is mostly in C#, although the initial
splash screen is done using unmanaged javaScript (yes, on purpose).
&lt;/p&gt;
&lt;p&gt;
I will be&amp;nbsp;walking through the innards of Popper!&amp;nbsp;at the &lt;a title="Atlanta Cutting Edge .NET" href="http://www.atlantace.com/" target="_blank"&gt;Atlanta
Cutting Edge .NET User Group&lt;/a&gt; meeting tonight. So if you will be attending, then
come check it out. Or if you just want to kill some time at "work" today... then play
with it a little and let me know how it goes (good or bad)...
&lt;/p&gt;
&lt;p&gt;
&lt;a title="Popper!" href="http://www.mindfusioncorp.com/popper/" target="_blank"&gt;http://www.mindfusioncorp.com/popper/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I know of one minor bug so far: if you try to click around while a set of bubbles
is in the process of "popping", then an error is raised internally, and the game pretty
much stops working. I just haven't had the time to get that bug addressed yet.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.mindfusioncorp.com/weblog/content/binary/Popper_25A4/image04.png" atomicselection="true"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="235" src="http://www.mindfusioncorp.com/weblog/content/binary/Popper_25A4/image0_thumb2.png" width="379" border="0"&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I intend to post the source for this sometime after this month's meeting. Pretty much
that equates to "when I have time to do it".
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.mindfusioncorp.com/weblog/aggbug.ashx?id=6a776eeb-8caa-4e90-800e-d05db67598b1" /&gt;</description>
      <comments>http://www.mindfusioncorp.com/weblog/CommentView,guid,6a776eeb-8caa-4e90-800e-d05db67598b1.aspx</comments>
      <category>.NET</category>
      <category>Events</category>
      <category>General</category>
      <category>Silverlight</category>
      <category>Web 2.0</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.mindfusioncorp.com/weblog/Trackback.aspx?guid=15d7ab03-1ca0-4728-bdba-3640657e6d19</trackback:ping>
      <pingback:server>http://www.mindfusioncorp.com/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mindfusioncorp.com/weblog/PermaLink,guid,15d7ab03-1ca0-4728-bdba-3640657e6d19.aspx</pingback:target>
      <dc:creator>Keith Rome</dc:creator>
      <wfw:comment>http://www.mindfusioncorp.com/weblog/CommentView,guid,15d7ab03-1ca0-4728-bdba-3640657e6d19.aspx</wfw:comment>
      <wfw:commentRss>http://www.mindfusioncorp.com/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=15d7ab03-1ca0-4728-bdba-3640657e6d19</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>
            <strong>UPDATE 10/25/2007:</strong> Updated this sample to function correctly
with the Silverlight 1.0 release. The main changes necessary were the typical 0.9
to 1.0 changes (remove "Sys.", isWindowless now takes a string and not a boolean,
event handlers no longer string based), and I also had to explicitly set the z-index
of the INPUT element. Thank you Erik for bringing it to my attention.</em>
        </p>
        <p>
 
</p>
        <p>
I have seen a lot of questions and confusion regarding capturing input when using
Silverlight. There are no Button, TextBox, or other similar controls to work with.
I see many folks asking for help with building their own directly within Silverlight
- and bless their hearts, that is a daunting task indeed! The UI model currently does
not offer basic input capture features such as "focus" or "tabbing", or even control-level
keystroke capture. So folks tend to start building those basic services first, before
they ever even get to writing code and xaml to support that simple textbox they need.
</p>
        <p>
If you read that first paragraph and thought "thats crazy, it shouldn't be that hard!",
then I would agree with you. Fortunately, there is a FAR easier and more robust way
to achieve the same thing. In fact, its something that is not new to Silverlight at
all, it's been with us for years. I am of course talking about the tried-and-true
html &lt;input&gt; tag.
</p>
        <p>
One of the most overlooked aspects of Silverlight is that it is a component, not a
platform. Your browser is the platform. It can do a lot of stuff, if you just ask
it to. Nobody wants an entire site as a single Silverlight canvas, just like nobody
wants an entire site as a Flash canvas (unless possibly it is a mini-game or rich
media application)... Flash designers realized this fact years ago. And as a component,
a <em>part</em> of the solution if you will, Silverlight can play nicely with it's
neighbors. With just a little bit of effort and sprinkling a very minimal amount of
javascript pixie dust, we can get a Silverlight applet talking to the rest of
our html DOM. And that's exactly what I am going to show in this topic...
</p>
        <p>
          <em>
            <strong>You can download the code demonstrated in this article here (<a href="http://www.mindfusioncorp.com/weblog/content/binary/QuickTip-TextboxesInSilverlight.zip">QuickTip-TextboxesInSilverlight.zip</a>).</strong>
          </em>
        </p>
        <p>
First of all, I am doing this with Silverlight 1.0 beta (the javascript one), as I
think the 1.1 alpha is far too likely to change, and this technique <em>should</em> work
with either. That, and I am lazy and don't want to come back and revisit this post
later to correct the code...
</p>
        <p>
Secondly, I am using the current CTP builds of Visual Studio Orcas and Blend 2 (the
May 2007 bits), both with the Silverlight extensions. If you are using something else,
then your mileage may vary.
</p>
        <p>
          <em>
            <strong>UPDATE 10/25/2007:</strong> Code updated for VS2008 beta2 and the RTM
version of Silverlight 1.0.</em>
        </p>
        <p>
Now on to the code... to be sure we are on the same page, I am creating a new project
from scratch...
</p>
        <p>
First, Create a new project in Blend. Select the Silverlight 1.0 (JavaScript) project
type. It does not matter what you name the project, but for this example I went with
"TextboxesInSilverlight".
</p>
        <p>
          <a href="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image06.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="142" src="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image0_thumb4.png" width="419" border="0" />
          </a>
        </p>
        <p>
Switch to XAML view and replace the default canvas with this markup:<font color="#0000ff" size="2"><br /></font></p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font color="#0000ff" size="2">
              <font face="Courier New" color="#ff0000">
                <font color="#0000ff">&lt;</font>
                <font color="#a52a2a">Canvas</font>
                <br />
 xmlns<font color="#0000ff">=</font><font color="#000000">"</font></font>
              <a href="http://schemas.microsoft.com/client/2007">
                <font face="Courier New" color="#0000ff">http://schemas.microsoft.com/client/2007</font>
              </a>
              <font face="Courier New" color="#ff0000">
                <font color="#000000">"</font>
                <br />
 xmlns:x<font color="#0000ff">=</font><font color="#000000">"</font></font>
              <a href="http://schemas.microsoft.com/winfx/2006/xaml">
                <font face="Courier New" color="#0000ff">http://schemas.microsoft.com/winfx/2006/xaml</font>
              </a>
              <font face="Courier New" color="#ff0000">
                <font color="#000000">"</font>
                <br />
 Width<font color="#0000ff">=<font color="#000000">"</font>252</font><font color="#000000">"</font> Height<font color="#0000ff">=<font color="#000000">"</font>272</font><font color="#000000">"</font><br />
 Background<font color="#0000ff">=<font color="#000000">"</font>#FFFF2121</font><font color="#000000">"</font><br />
 <font color="#0000ff">&gt;</font><br />
  <font color="#0000ff">&lt;</font><font color="#a52a2a">TextBlock</font> Width<font color="#0000ff">=<font color="#000000">"</font>64</font><font color="#000000">"</font> Height<font color="#0000ff">=<font color="#000000">"</font>24</font><font color="#000000">"</font> Canvas.Left<font color="#0000ff">=<font color="#000000">"</font>8</font><font color="#000000">"</font> Canvas.Top<font color="#0000ff">=<font color="#000000">"</font>8</font><font color="#000000">"</font><br />
             Text<font color="#0000ff">=<font color="#000000">"</font>Opacity</font><font color="#000000">"</font> TextWrapping<font color="#0000ff">=<font color="#000000">"</font>Wrap<font color="#000000">"</font>/&gt;</font><br />
  <font color="#0000ff">&lt;</font><font color="#a52a2a">Ellipse</font> Opacity<font color="#0000ff">=<font color="#000000">"</font>1</font><font color="#000000">"</font> Fill<font color="#0000ff">=<font color="#000000">"</font>#FF0406FF</font><font color="#000000">"</font> Stroke<font color="#0000ff">=<font color="#000000">"</font>#FF000000</font><font color="#000000">"</font><br />
           x:Name<font color="#0000ff">=<font color="#000000">"</font>TheCircle</font><font color="#000000">"</font> Width<font color="#0000ff">=<font color="#000000">"</font>180</font><font color="#000000">"</font> Height<font color="#0000ff">=<font color="#000000">"</font>180</font><font color="#000000">"</font> <br />
           Canvas.Left<font color="#0000ff">=<font color="#000000">"</font>36</font><font color="#000000">"</font> Canvas.Top<font color="#0000ff">=<font color="#000000">"</font>64<font color="#000000">"</font>/&gt;</font><br /><font color="#0000ff">&lt;/</font><font color="#a52a2a">Canvas</font><font color="#0000ff">&gt;</font></font>
            </font>
          </p>
        </blockquote>
        <p>
This will create a simple red canvas, with a blue circle.
</p>
        <p>
At this point, I generally switch over to Visual Studio Orcas since Blend does not
have Intellisense nor does it really know how to deal with JavaScript. You can do
this easily by right-clicking a project item (such as the xaml file) and selecting
"Edit in Visual Studio".
</p>
        <p>
          <a href="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image011.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="214" src="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image0_thumb7.png" width="217" border="0" />
          </a>
        </p>
        <p>
Next, we need to do one small housekeeping chore to make sure that our Silverlight
canvas plays nicely - specifically, we need to ask it to operate "windowless", which
will allow other dhtml elements to overlay it, Open the Default.html.js file, and
modify the call to Silverlight.createObjectEx(). We want to add the parameter for
isWindowless...
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New"> Silverlight.createObjectEx({<br />
  source: <font color="#a52a2a">"Scene.xaml"</font>,<br />
  parentElement: document.getElementById(<font color="#a52a2a">"</font><font color="#a52a2a">SilverlightControlHost</font><font color="#a52a2a">"</font>),<br />
  id: <font color="#a52a2a">"SilverlightControl"</font>,<br />
  properties: {<br />
   width: <font color="#a52a2a">"100%"</font>,<br />
   height: <font color="#a52a2a">"100%"</font>,<br />
   version: <font color="#a52a2a">"0.9"</font>,<br />
   isWindowless: <font color="#a52a2a">"true"</font><br />
  },<br />
  events: {<br />
   onLoad: sceneLoaded<br />
  }<br />
 });</font>
            <br />
          </p>
        </blockquote>
        <p>
To make things a bit more "clean", we will create the input element directly from
code, however it's always good to control visual styling with CSS. Therefore, open
up the Default.html, and alter the &lt;style&gt; tag to match the following: 
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New"> <font color="#0000ff">&lt;</font><font color="#a52a2a">style</font><font color="#ff0000">type</font><font color="#0000ff">="text/css"&gt;</font><br />
  <font color="#a52a2a">div</font>, <font color="#a52a2a">body</font>, <font color="#a52a2a">input</font><br />
  {<br />
   <font color="#ff0000">margin</font>: <font color="#0000ff">0</font>;<br />
   <font color="#ff0000">padding</font>: <font color="#0000ff">0</font>;<br />
  }<br />
  <font color="#a52a2a">#opacity</font><br />
  {<br />
   <font color="#ff0000">margin</font>: -<font color="#0000ff">272px
0 0 75px</font>;<br />
   <font color="#ff0000">z-index<font color="#000000">:</font></font><font color="#000000"><font color="#0000ff">100</font>;</font><br />
  }<br />
  <font color="#a52a2a">.silverlightHost</font><br />
  {<br />
   <font color="#ff0000">margin</font>: <font color="#0000ff">40px
auto auto auto</font>;<br />
   <font color="#ff0000">height</font>: <font color="#0000ff">272px</font>;<br />
   <font color="#ff0000">width</font>: <font color="#0000ff">252px</font>;<br />
  }<br />
 &lt;/<font color="#a52a2a">style</font>&gt;</font>
          </p>
        </blockquote>
        <p>
This will handle the placement and sizing of the silverlight container &lt;div&gt;
as well as the input control itself. The negative margin is not a typo - this is used
to pull the input control "on top" of the silverlight canvas. We could have also used
absolute positioning, but that is much more brittle, relative positioning FTW. Also,
notice the use of "auto" margins for the main Silverlight Host &lt;div&gt;. This is
how you can center content without resorting to using &lt;center&gt; or &lt;table&gt;...
if you take nothing away from this post, at least remember that one trick. 
</p>
        <p>
The last thing we must do is wire the whole thing up. This can be done in many places,
in many ways. I consider this particular TextBox to be an extension of the Xaml "scene",
so I will add my code to the TextboxesInSilverlight.Scene class which was created
for us by the Blend project template. This is not the only place you could do this
kind of code, but I found that in this particular example it made the most sense.
Had I been building a dialog for a game engine, I might have this code in a seperate
script file that manages my game mechanics (but thats another article...). 
</p>
        <p>
First, we need to capture a global reference to the Scene object that is created (this
object is instantiated by the createSilverlight() function of the Default.html.js
script file we edited in a previous step). The purpose of capturing this reference
is that we will need it later in an event handler. This will allow our html &lt;input&gt;
control to communicate back with the silverlight content. This is easier done than
said. Open the Scene.xaml.js file. Just before the definition of the TextboxesInSilverlight.Scene.prototype
(look up javascript prototype for what this is if you are interested, but that discussion
is out of scope for this article), add a line of code to declare the global reference: 
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">
              <font color="#0000ff">var</font> globalScene = <font color="#0000ff">null</font>; </font>
          </p>
        </blockquote>
        <p>
Now we will create a callback function that will be used to create our JavaScript
object and initialize it: 
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <pre>
            <font color="#0000ff">function</font> sceneLoaded(control,
userContext, rootElement)<br />
{<br />
    globalScene = <font color="#0000ff">new</font> TextboxesInSilverlight.Scene();<br />
    globalScene.handleLoad(control, userContext, rootElement);<br />
}; </pre>
        </blockquote>
        <p>
Now, the idea for this example is that the value of the text box will determine the
"Opacity" Xaml property of the Ellipse shape in our markup. In order for the event
handler we are about to add to be able to do this, we will capture a reference to
the circle object (technically we can wait and use findName() later during the event
handler, but I prefer to capture it only once - its just my style of coding). Add
this line to the handleLoad function: 
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">
              <font color="#0000ff">this</font>.circle = control.content.findName(<font color="#a52a2a">"TheCircle"</font>);</font>
          </p>
        </blockquote>
        <p>
Next, we will create the input control and add it to the DHTML document. We will add
it directly to the same &lt;div&gt; that Silverlight has injected itself into, and
therefore any layout or positioning that affects the Silverlight canvas will also
affect our &lt;input&gt; box. Add this code to the end of the handleLoad function: 
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">
              <font color="#0000ff">var</font> opacityEdit = window.document.createElement(<font color="#a52a2a">"input"</font>);<br />
opacityEdit.type = <font color="#a52a2a">"text"</font>;<br />
opacityEdit.id = <font color="#a52a2a">"opacity"</font>;<br />
opacityEdit.name = <font color="#a52a2a">"opacity"</font>;<br />
opacityEdit.value = <font color="#a52a2a">"1.0"</font></font>;
</p>
        </blockquote>
        <p>
We are almost done - only two more steps and then we can fire this thing up! First,
we need to add an event handler to react to changes in the value property of the input
control. Add this code to the very end of the handleLoad function: 
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">opacityEdit.onpropertychange = <font color="#0000ff">function</font>()<br />
    {<br />
        <font color="#0000ff">if</font> (<font color="#0000ff">event</font>.propertyName
== <font color="#a52a2a">"value"</font>)<br />
        {<br />
            globalScene.circle.Opacity
= <font color="#0000ff">event</font>.srcElement.value;<br />
        }<br />
    }</font>
          </p>
        </blockquote>
        <p>
This effectively creates an anonymous function to handle property change events on
the &lt;input&gt; control, which in turn updates the Opacity property of the circle
shape. Cool, huh? 
</p>
        <p>
The last thing to do is finally add the new &lt;input&gt; element to the page, otherwise
all the work until this point will have had no discernable impact at all... add this
one last line to the handleLoad function: 
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">
              <font color="#0000ff">this</font>.control.parentElement.appendChild(opacityEdit);</font>
          </p>
        </blockquote>
        <p>
At this point, your Scene.xaml.js file should look like this: 
</p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <font face="Courier New">
              <font color="#0000ff">if</font> (!window.TextboxesInSilverlight)<br />
 window.TextboxesInSilverlight = {};</font>
          </p>
          <p>
            <font face="Courier New">TextboxesInSilverlight.Scene = <font color="#0000ff">function</font>() 
<br />
{<br />
}</font>
          </p>
          <p>
            <font face="Courier New">
              <font color="#0000ff">var</font> globalScene = <font color="#0000ff">null</font>;</font>
          </p>
          <p>
            <font face="Courier New">
              <font color="#0000ff">function</font> sceneLoaded(control,
userContext, rootElement)<br />
{<br />
    globalScene = <font color="#0000ff">new</font> TextboxesInSilverlight.Scene();<br />
    globalScene.handleLoad(control, userContext, rootElement);<br />
}</font>
          </p>
          <p>
            <font face="Courier New">TextboxesInSilverlight.Scene.prototype =<br />
{<br />
 handleLoad: <font color="#0000ff">function</font>(control, userContext, rootElement) 
<br />
 {<br />
  <font color="#0000ff">this</font>.control = control;<br />
  <br />
  <font color="#0000ff">this</font>.circle = control.content.findName<font color="#a52a2a">("TheCircle"</font>);<br />
  <br />
  <font color="#0000ff">var</font> opacityEdit = window.document.createElement(<font color="#a52a2a">"input"</font>);<br />
  opacityEdit.type = <font color="#a52a2a">"text"</font>;<br />
  opacityEdit.id = <font color="#a52a2a">"opacity"</font>;<br />
  opacityEdit.name = <font color="#a52a2a">"opacity"</font>;<br />
  opacityEdit.value = <font color="#a52a2a">"1.0"</font>;<br />
  opacityEdit.onpropertychange = <font color="#0000ff">function</font>()<br />
    {<br />
      <font color="#0000ff">if</font> (<font color="#0000ff">event</font>.propertyName
== <font color="#a52a2a">"value"</font>)<br />
      {<br />
        globalScene.circle.Opacity = <font color="#0000ff">event</font>.srcElement.value;<br />
      }<br />
    }<br />
  </font>
            <font face="Courier New">
              <font color="#0000ff">this</font>.control.parentElement.appendChild(opacityEdit);<br />
 } <br />
}</font>
          </p>
        </blockquote>
        <p>
        </p>
        <p>
If the typo gods favor you, then you should be able to use F5 to run the page and
see it all working together: 
</p>
        <p>
          <a href="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image015.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="240" src="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image0_thumb9.png" width="228" border="0" />
          </a>
          <a href="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image017.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="240" src="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image016.png" width="226" border="0" />
          </a>
        </p>
        <p>
Notice the positioning of the input textboxes, and the interaction of them with the
underlying Silverlight canvas. This is just a simple example, but can be a very powerful
way to "plug in" Silverlight into the surrounding DHTML. 
</p>
        <img width="0" height="0" src="http://www.mindfusioncorp.com/weblog/aggbug.ashx?id=15d7ab03-1ca0-4728-bdba-3640657e6d19" />
      </body>
      <title>Quick Tip - Input Controls in Silverlight</title>
      <guid isPermaLink="false">http://www.mindfusioncorp.com/weblog/PermaLink,guid,15d7ab03-1ca0-4728-bdba-3640657e6d19.aspx</guid>
      <link>http://www.mindfusioncorp.com/weblog/2007/06/14/QuickTipInputControlsInSilverlight.aspx</link>
      <pubDate>Thu, 14 Jun 2007 20:25:05 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;&lt;strong&gt;UPDATE 10/25/2007:&lt;/strong&gt; Updated this sample to function correctly
with the Silverlight 1.0 release. The main changes necessary were the typical 0.9
to 1.0 changes (remove "Sys.", isWindowless now takes a string and not a boolean,
event handlers no longer string based), and I also had to explicitly set the z-index
of the INPUT element. Thank you Erik for bringing it to my attention.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
I have seen a lot of questions and confusion regarding capturing input when using
Silverlight. There are no Button, TextBox, or other similar controls to work with.
I see many folks asking for help with building their own directly within Silverlight
- and bless their hearts, that is a daunting task indeed! The UI model currently does
not offer basic input capture features such as "focus" or "tabbing", or even control-level
keystroke capture. So folks tend to start building those basic services first, before
they ever even get to writing code and xaml to support that simple textbox they need.
&lt;/p&gt;
&lt;p&gt;
If you read that first paragraph and thought "thats crazy, it shouldn't be that hard!",
then I would agree with you. Fortunately, there is a FAR easier and more robust way
to achieve the same thing. In fact, its something that is not new to Silverlight at
all, it's been with us for years. I am of course talking about the tried-and-true
html &amp;lt;input&amp;gt; tag.
&lt;/p&gt;
&lt;p&gt;
One of the most overlooked aspects of Silverlight is that it is a component, not a
platform. Your browser is the platform. It can do a lot of stuff, if you just ask
it to. Nobody wants an entire site as a single Silverlight canvas, just like nobody
wants an entire site as a Flash canvas (unless possibly it is a mini-game or rich
media application)... Flash designers realized this fact years ago. And as a component,
a &lt;em&gt;part&lt;/em&gt; of the solution if you will, Silverlight can play nicely with it's
neighbors. With just a little bit of effort and sprinkling a very minimal amount of
javascript pixie dust, we can&amp;nbsp;get a Silverlight applet talking to the rest of
our html DOM. And that's exactly what I am going to show in this topic...
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;strong&gt;You can download the code demonstrated in this article here (&lt;a href="http://www.mindfusioncorp.com/weblog/content/binary/QuickTip-TextboxesInSilverlight.zip"&gt;QuickTip-TextboxesInSilverlight.zip&lt;/a&gt;).&lt;/strong&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
First of all, I am doing this with Silverlight 1.0 beta (the javascript one), as I
think the 1.1 alpha is far too likely to change, and this technique &lt;em&gt;should&lt;/em&gt; work
with either. That, and I am lazy and don't want to come back and revisit this post
later to correct the code...
&lt;/p&gt;
&lt;p&gt;
Secondly, I am using the current CTP builds of Visual Studio Orcas and Blend 2 (the
May 2007 bits), both with the Silverlight extensions. If you are using something else,
then your mileage may vary.
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;strong&gt;UPDATE 10/25/2007:&lt;/strong&gt; Code updated for VS2008 beta2 and the RTM
version of Silverlight 1.0.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Now on to the code... to be sure we are on the same page, I am creating a new project
from scratch...
&lt;/p&gt;
&lt;p&gt;
First, Create a new project in Blend. Select the Silverlight 1.0 (JavaScript) project
type. It does not matter what you name the project, but for this example I went with
"TextboxesInSilverlight".
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image06.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=142 src="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image0_thumb4.png" width=419 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Switch to XAML view and replace the default canvas with this markup:&lt;font color=#0000ff size=2&gt;
&lt;br&gt;
&lt;/font&gt;
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font color=#0000ff size=2&gt;&lt;font face="Courier New" color=#ff0000&gt;&lt;font color=#0000ff&gt;&amp;lt;&lt;/font&gt;&lt;font color=#a52a2a&gt;Canvas&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;xmlns&lt;font color=#0000ff&gt;=&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt;&lt;/font&gt;&lt;a href="http://schemas.microsoft.com/client/2007"&gt;&lt;font face="Courier New" color=#0000ff&gt;http://schemas.microsoft.com/client/2007&lt;/font&gt;&lt;/a&gt;&lt;font face="Courier New" color=#ff0000&gt;&lt;font color=#000000&gt;"&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;xmlns:x&lt;font color=#0000ff&gt;=&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt;&lt;/font&gt;&lt;a href="http://schemas.microsoft.com/winfx/2006/xaml"&gt;&lt;font face="Courier New" color=#0000ff&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/font&gt;&lt;/a&gt;&lt;font face="Courier New" color=#ff0000&gt;&lt;font color=#000000&gt;"&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;Width&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;252&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt; Height&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;272&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;Background&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;#FFFF2121&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&lt;font color=#0000ff&gt;&amp;gt;&lt;/font&gt;
&lt;br&gt;
&amp;nbsp; &lt;font color=#0000ff&gt;&amp;lt;&lt;/font&gt;&lt;font color=#a52a2a&gt;TextBlock&lt;/font&gt; Width&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;64&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt; Height&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;24&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt; Canvas.Left&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;8&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt; Canvas.Top&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;8&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&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; Text&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;Opacity&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt; TextWrapping&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;Wrap&lt;font color=#000000&gt;"&lt;/font&gt;/&amp;gt;&lt;/font&gt;
&lt;br&gt;
&amp;nbsp; &lt;font color=#0000ff&gt;&amp;lt;&lt;/font&gt;&lt;font color=#a52a2a&gt;Ellipse&lt;/font&gt; Opacity&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;1&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt; Fill&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;#FF0406FF&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt; Stroke&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;#FF000000&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&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;x:Name&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;TheCircle&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt;&amp;nbsp;Width&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;180&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt; Height&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;180&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Canvas.Left&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;36&lt;/font&gt;&lt;font color=#000000&gt;"&lt;/font&gt; Canvas.Top&lt;font color=#0000ff&gt;=&lt;font color=#000000&gt;"&lt;/font&gt;64&lt;font color=#000000&gt;"&lt;/font&gt;/&amp;gt;&lt;/font&gt;
&lt;br&gt;
&lt;font color=#0000ff&gt;&amp;lt;/&lt;/font&gt;&lt;font color=#a52a2a&gt;Canvas&lt;/font&gt;&lt;font color=#0000ff&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt;&gt; 
&lt;p&gt;
This will create a simple red canvas, with a blue circle.
&lt;/p&gt;
&lt;p&gt;
At this point, I generally switch over to Visual Studio Orcas since Blend does not
have Intellisense nor does it really know how to deal with JavaScript. You can do
this easily by right-clicking a project item (such as the xaml file) and selecting
"Edit in Visual Studio".
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image011.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=214 src="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image0_thumb7.png" width=217 border=0&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Next, we need to do one small housekeeping chore to make sure that our Silverlight
canvas plays nicely - specifically, we need to ask it to operate "windowless", which
will allow other dhtml elements to overlay it, Open the Default.html.js file, and
modify the call to Silverlight.createObjectEx(). We want to add the parameter for
isWindowless...
&lt;/p&gt;
&lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;Silverlight.createObjectEx({&lt;br&gt;
&amp;nbsp;&amp;nbsp;source: &lt;font color=#a52a2a&gt;"Scene.xaml"&lt;/font&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;parentElement: document.getElementById(&lt;font color=#a52a2a&gt;"&lt;/font&gt;&lt;font color=#a52a2a&gt;SilverlightControlHost&lt;/font&gt;&lt;font color=#a52a2a&gt;"&lt;/font&gt;),&lt;br&gt;
&amp;nbsp;&amp;nbsp;id: &lt;font color=#a52a2a&gt;"SilverlightControl"&lt;/font&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;properties: {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;width: &lt;font color=#a52a2a&gt;"100%"&lt;/font&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;height: &lt;font color=#a52a2a&gt;"100%"&lt;/font&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;version: &lt;font color=#a52a2a&gt;"0.9"&lt;/font&gt;,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;isWindowless: &lt;font color=#a52a2a&gt;"true"&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;},&lt;br&gt;
&amp;nbsp;&amp;nbsp;events: {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;onLoad: sceneLoaded&lt;br&gt;
&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;});&lt;/font&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
To make things a bit more "clean", we will create the input element directly from
code, however it's always good to control visual styling with CSS. Therefore, open
up the Default.html, and alter the &amp;lt;style&amp;gt; tag to match the following: &lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&lt;font color=#0000ff&gt;&amp;lt;&lt;/font&gt;&lt;font color=#a52a2a&gt;style&lt;/font&gt; &lt;font color=#ff0000&gt;type&lt;/font&gt;&lt;font color=#0000ff&gt;="text/css"&amp;gt;&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color=#a52a2a&gt;div&lt;/font&gt;, &lt;font color=#a52a2a&gt;body&lt;/font&gt;, &lt;font color=#a52a2a&gt;input&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#ff0000&gt;margin&lt;/font&gt;: &lt;font color=#0000ff&gt;0&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#ff0000&gt;padding&lt;/font&gt;: &lt;font color=#0000ff&gt;0&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color=#a52a2a&gt;#opacity&lt;/font&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#ff0000&gt;margin&lt;/font&gt;: -&lt;font color=#0000ff&gt;272px 0
0 75px&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#ff0000&gt;z-index&lt;font color=#000000&gt;:&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000&gt; &lt;font color=#0000ff&gt;100&lt;/font&gt;;&lt;/font&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color=#a52a2a&gt;.silverlightHost&lt;/font&gt; 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#ff0000&gt;margin&lt;/font&gt;: &lt;font color=#0000ff&gt;40px auto
auto auto&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#ff0000&gt;height&lt;/font&gt;: &lt;font color=#0000ff&gt;272px&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#ff0000&gt;width&lt;/font&gt;: &lt;font color=#0000ff&gt;252px&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;lt;/&lt;font color=#a52a2a&gt;style&lt;/font&gt;&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
This will handle the placement and sizing of the silverlight container &amp;lt;div&amp;gt;
as well as the input control itself. The negative margin is not a typo - this is used
to pull the input control "on top" of the silverlight canvas. We could have also used
absolute positioning, but that is much more brittle, relative positioning FTW. Also,
notice the use of "auto" margins for the main Silverlight Host &amp;lt;div&amp;gt;. This is
how you can center content without resorting to using &amp;lt;center&amp;gt; or &amp;lt;table&amp;gt;...
if you take nothing away from this post, at least remember that one trick. 
&lt;p&gt;
The last thing we must do is wire the whole thing up. This can be done in many places,
in many ways. I consider this particular TextBox to be an extension of the Xaml "scene",
so I will add my code to the TextboxesInSilverlight.Scene class which was created
for us by the Blend project template. This is not the only place you could do this
kind of code, but I found that in this particular example it made the most sense.
Had I been building a dialog for a game engine, I might have this code in a seperate
script file that manages my game mechanics (but thats another article...). 
&lt;p&gt;
First, we need to capture a global reference to the Scene object that is created (this
object is instantiated by the createSilverlight() function of the Default.html.js
script file we edited in a previous step). The purpose of capturing this reference
is that we will need it later in an event handler. This will allow our html &amp;lt;input&amp;gt;
control to communicate back with the silverlight content. This is easier done than
said. Open the Scene.xaml.js file. Just before the definition of the TextboxesInSilverlight.Scene.prototype
(look up javascript prototype for what this is if you are interested, but that discussion
is out of scope for this article), add a line of code to declare the global reference: &lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;var&lt;/font&gt; globalScene = &lt;font color=#0000ff&gt;null&lt;/font&gt;; &lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Now we will create a callback function that will be used to create our JavaScript
object and initialize it: &lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt;&lt;pre&gt;&lt;font color=#0000ff&gt;function&lt;/font&gt; sceneLoaded(control,
userContext, rootElement)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; globalScene = &lt;font color=#0000ff&gt;new&lt;/font&gt; TextboxesInSilverlight.Scene();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; globalScene.handleLoad(control, userContext, rootElement);&lt;br&gt;
}; &lt;/pre&gt;&lt;/blockquote&gt; 
&lt;p&gt;
Now, the idea for this example is that the value of the text box will determine the
"Opacity" Xaml property of the Ellipse shape in our markup. In order for the event
handler we are about to add to be able to do this, we will capture a reference to
the circle object (technically we can wait and use findName() later during the event
handler, but I prefer to capture it only once - its just my style of coding). Add
this line to the handleLoad function: &lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;this&lt;/font&gt;.circle = control.content.findName(&lt;font color=#a52a2a&gt;"TheCircle"&lt;/font&gt;);&lt;/font&gt; 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Next, we will create the input control and add it to the DHTML document. We will add
it directly to the same &amp;lt;div&amp;gt; that Silverlight has injected itself into, and
therefore any layout or positioning that affects the Silverlight canvas will also
affect our &amp;lt;input&amp;gt; box. Add this code to the end of the handleLoad function: &lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;var&lt;/font&gt; opacityEdit = window.document.createElement(&lt;font color=#a52a2a&gt;"input"&lt;/font&gt;);&lt;br&gt;
opacityEdit.type = &lt;font color=#a52a2a&gt;"text"&lt;/font&gt;;&lt;br&gt;
opacityEdit.id = &lt;font color=#a52a2a&gt;"opacity"&lt;/font&gt;;&lt;br&gt;
opacityEdit.name = &lt;font color=#a52a2a&gt;"opacity"&lt;/font&gt;;&lt;br&gt;
opacityEdit.value = &lt;font color=#a52a2a&gt;"1.0"&lt;/font&gt;&lt;/font&gt;;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
We are almost done - only two more steps and then we can fire this thing up! First,
we need to add an event handler to react to changes in the value property of the input
control. Add this code to the very end of the handleLoad function: &lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;opacityEdit.onpropertychange = &lt;font color=#0000ff&gt;function&lt;/font&gt;()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#0000ff&gt;if&lt;/font&gt; (&lt;font color=#0000ff&gt;event&lt;/font&gt;.propertyName
== &lt;font color=#a52a2a&gt;"value"&lt;/font&gt;)&lt;br&gt;
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; globalScene.circle.Opacity
= &lt;font color=#0000ff&gt;event&lt;/font&gt;.srcElement.value;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt; 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
This effectively creates an anonymous function to handle property change events on
the &amp;lt;input&amp;gt; control, which in turn updates the Opacity property of the circle
shape. Cool, huh? 
&lt;p&gt;
The last thing to do is finally add the new &amp;lt;input&amp;gt; element to the page, otherwise
all the work until this point will have had no discernable impact at all... add this
one last line to the handleLoad function: &lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;this&lt;/font&gt;.control.parentElement.appendChild(opacityEdit);&lt;/font&gt; 
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
At this point, your Scene.xaml.js file should look like this: &lt;blockquote dir=ltr style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;if&lt;/font&gt; (!window.TextboxesInSilverlight)&lt;br&gt;
&amp;nbsp;window.TextboxesInSilverlight = {};&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;TextboxesInSilverlight.Scene = &lt;font color=#0000ff&gt;function&lt;/font&gt;() 
&lt;br&gt;
{&lt;br&gt;
}&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;var&lt;/font&gt; globalScene = &lt;font color=#0000ff&gt;null&lt;/font&gt;;&lt;/font&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;function&lt;/font&gt; sceneLoaded(control,
userContext, rootElement)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; globalScene = &lt;font color=#0000ff&gt;new&lt;/font&gt; TextboxesInSilverlight.Scene();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; globalScene.handleLoad(control, userContext, rootElement);&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;TextboxesInSilverlight.Scene.prototype =&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;handleLoad: &lt;font color=#0000ff&gt;function&lt;/font&gt;(control, userContext, rootElement) 
&lt;br&gt;
&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;this&lt;/font&gt;.control = control;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;this&lt;/font&gt;.circle = control.content.findName&lt;font color=#a52a2a&gt;("TheCircle"&lt;/font&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;var&lt;/font&gt; opacityEdit = window.document.createElement(&lt;font color=#a52a2a&gt;"input"&lt;/font&gt;);&lt;br&gt;
&amp;nbsp;&amp;nbsp;opacityEdit.type = &lt;font color=#a52a2a&gt;"text"&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;opacityEdit.id = &lt;font color=#a52a2a&gt;"opacity"&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;opacityEdit.name = &lt;font color=#a52a2a&gt;"opacity"&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;opacityEdit.value = &lt;font color=#a52a2a&gt;"1.0"&lt;/font&gt;;&lt;br&gt;
&amp;nbsp;&amp;nbsp;opacityEdit.onpropertychange = &lt;font color=#0000ff&gt;function&lt;/font&gt;()&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;&lt;font color=#0000ff&gt;if&lt;/font&gt; (&lt;font color=#0000ff&gt;event&lt;/font&gt;.propertyName
== &lt;font color=#a52a2a&gt;"value"&lt;/font&gt;)&lt;br&gt;
&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;globalScene.circle.Opacity = &lt;font color=#0000ff&gt;event&lt;/font&gt;.srcElement.value;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color=#0000ff&gt;this&lt;/font&gt;.control.parentElement.appendChild(opacityEdit);&lt;br&gt;
&amp;nbsp;}&amp;nbsp;&lt;br&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
&lt;p&gt;
If the typo gods favor you, then you should be able to use F5 to run the page and
see it all working together: 
&lt;p&gt;
&lt;a href="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image015.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=240 src="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image0_thumb9.png" width=228 border=0&gt;&lt;/a&gt; &lt;a href="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image017.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=240 src="http://www.mindfusioncorp.com/weblog/content/binary/QuickTipInputControlsinSilverlight_E5E5/image016.png" width=226 border=0&gt;&lt;/a&gt; 
&lt;p&gt;
Notice the positioning of the input textboxes, and the interaction of them with the
underlying Silverlight canvas. This is just a simple example, but can be a very powerful
way to "plug in"&amp;nbsp;Silverlight&amp;nbsp;into the surrounding&amp;nbsp;DHTML. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.mindfusioncorp.com/weblog/aggbug.ashx?id=15d7ab03-1ca0-4728-bdba-3640657e6d19" /&gt;</description>
      <comments>http://www.mindfusioncorp.com/weblog/CommentView,guid,15d7ab03-1ca0-4728-bdba-3640657e6d19.aspx</comments>
      <category>.NET</category>
      <category>General</category>
      <category>Silverlight</category>
      <category>Tips and Tricks</category>
      <category>Web 2.0</category>
    </item>
    <item>
      <trackback:ping>http://www.mindfusioncorp.com/weblog/Trackback.aspx?guid=92aaf646-bcf9-4a05-91f0-9ac12749ab1f</trackback:ping>
      <pingback:server>http://www.mindfusioncorp.com/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mindfusioncorp.com/weblog/PermaLink,guid,92aaf646-bcf9-4a05-91f0-9ac12749ab1f.aspx</pingback:target>
      <dc:creator>Keith Rome</dc:creator>
      <wfw:comment>http://www.mindfusioncorp.com/weblog/CommentView,guid,92aaf646-bcf9-4a05-91f0-9ac12749ab1f.aspx</wfw:comment>
      <wfw:commentRss>http://www.mindfusioncorp.com/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=92aaf646-bcf9-4a05-91f0-9ac12749ab1f</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It has been a good while since this industry has had a significant shake-up, where
the world as we know it changes almost overnight, and our skills and practices are
all made obsolete. We generally seem to have one every few years or so, and according
to my calculations, it has been about 7 or 8 years since the last one.
</p>
        <p>
I am sure there were other events, but the first I can recall was the introduction
of Object Oriented programming in the 80's. This paradigm shift left multitudes of
mainframe COBOL and RPG analysts behind, forever to toil in a world of green on black
terminal displays. Then in the early and mid 90's there was an explosion of "client-server"
and "N-Tier" applications in the business world. These were all the rage, and
again the flock was divided. Many OOP purists were left in the dust, trying to fend
off the "younger kids" that embraced the 3GL and 4GL tools of the day. But as luck
would have it, only a few years later the terms "client-server" and "N-Tier" took
a back seat to the newest technology explosion - the age of the Web. Right or Wrong,
everyone wanted to be on the web. Try as they might, the n-tier supporters could not
withstand this assault. To this day, there remains a contingent of developers that
cling to the world before the web - in the Microsoft kingdom, we call them "Windows
Forms Programmers", or perhaps the slightly more dignified "Smart Client Developers".
But the significant majority of development work admittedly goes into Web applications.
</p>
        <p>
So for the last few generations of the industry, roughly every five to seven years,
we experienced a wholesale disruption in the status quo. Things are no longer what
we thought they were. Skills become unmarketable. Management becomes confused. Projects
get scrapped. We have to retool - retool or else go the way of the Do-Do Bird (extinct).
</p>
        <p>
The only problem is - it has been about eight years now since the last paradigm shift
(I do not count .NET as a paradigm shift - it is simply a consolidation and improvement
on ideas and methods already in place). It has been eight years, and I fear that
we are long overdue. More than that though - I feel that perhaps, just perhaps, the
paradigm shift has already begun - and that I can't see it due to my own Myopia. And
what if the shift has already passed me by, and I have missed it entirely?
</p>
        <p>
In conclusion, I think the shift is just now underway. I have smelled the crispness
in the air that precedes a thunderstorm. I think the industry is about to change again,
in a very significant way, and I hope to be a small part of it yet again. But
in order to accept and participate in a significant change, a person must adapt to
the new way of things. To that end I have begun the arduous task of retooling and
rebranding myself. This will not be the first time, nor likely the last. As a as/400
specialist, converted to PC technician, converted to Delphi developer, converted to
DBA, converted to Web Developer, and finally to .NET windows/web developer, I can
say that I have definately been through this process before, and it does not scare
me. What scares me is the thought of <em>not</em> adapting.
</p>
        <p>
Some of the people I know and trust feel that they too have "seen the light". Some
have their own theories about where to be when the music stops playing. My good friend <a href="http://devcow.com/blogs/jdattis/default.aspx" target="_blank">Scooter</a> seems
to think that Sharepoint is the entire future. I don't necessarily agree with that.
I have heard similar theories about the grand direction of things from others as well
("Linux is the future!", "Everything will be AJAX!", "OMGZ It's all going to
Pocket PC format!") - most of which I cannot find reason with either. Everyone
seems to agree that the winds are changing, only nobody appears to agree on the
direction. But I have my own ideas and theories and will once again be betting the
next half-decade or longer of my career on that insight. It hasn't let me down in
the past - I trust it will not let me down this time either.
</p>
        <img width="0" height="0" src="http://www.mindfusioncorp.com/weblog/aggbug.ashx?id=92aaf646-bcf9-4a05-91f0-9ac12749ab1f" />
      </body>
      <title>A storm is brewing</title>
      <guid isPermaLink="false">http://www.mindfusioncorp.com/weblog/PermaLink,guid,92aaf646-bcf9-4a05-91f0-9ac12749ab1f.aspx</guid>
      <link>http://www.mindfusioncorp.com/weblog/2007/04/30/AStormIsBrewing.aspx</link>
      <pubDate>Mon, 30 Apr 2007 20:29:00 GMT</pubDate>
      <description>&lt;p&gt;
It has been a good while since this industry has had a significant shake-up, where
the world as we know it changes almost overnight, and our skills and practices are
all made obsolete. We generally seem to have one every few years or so, and according
to my calculations, it has been about 7 or 8 years since the last one.
&lt;/p&gt;
&lt;p&gt;
I am sure there were other events, but the first I can recall was the introduction
of Object Oriented programming in the 80's. This paradigm shift left multitudes of
mainframe COBOL and RPG analysts behind, forever to toil in a world of green on black
terminal displays. Then in the early and mid 90's there was an explosion of "client-server"
and "N-Tier"&amp;nbsp;applications in the business world. These were all the rage, and
again the flock was divided. Many OOP purists were left in the dust, trying to fend
off the "younger kids" that embraced the 3GL and 4GL tools of the day. But as luck
would have it, only a few years later the terms "client-server" and "N-Tier" took
a back seat to the newest technology explosion - the age of the Web. Right or Wrong,
everyone wanted to be on the web. Try as they might, the n-tier supporters could not
withstand this assault. To this day, there remains a contingent of developers that
cling to the world before the web - in the Microsoft kingdom, we call them "Windows
Forms Programmers", or perhaps the slightly more dignified "Smart Client Developers".
But the significant majority of development work admittedly goes into Web applications.
&lt;/p&gt;
&lt;p&gt;
So for the last few generations of the industry, roughly every five to seven years,
we experienced a wholesale disruption in the status quo. Things are no longer what
we thought they were. Skills become unmarketable. Management becomes confused. Projects
get scrapped. We have to retool - retool or else go the way of the Do-Do Bird (extinct).
&lt;/p&gt;
&lt;p&gt;
The only problem is - it has been about eight years now since the last paradigm shift
(I do not count .NET as a paradigm shift - it is simply a consolidation and improvement
on ideas and methods already in place). It has been&amp;nbsp;eight years, and I fear that
we are long overdue. More than that though - I feel that perhaps, just perhaps, the
paradigm shift has already begun - and that I can't see it due to my own Myopia. And
what if the shift has already passed me by, and I have missed it entirely?
&lt;/p&gt;
&lt;p&gt;
In conclusion, I think the shift is just now underway. I have smelled the crispness
in the air that precedes a thunderstorm. I think the industry is about to change again,
in a very significant way, and&amp;nbsp;I hope to be a small part of it yet again. But
in order to accept and participate in a significant change, a person must adapt to
the new way of things. To that end I have begun the arduous task of retooling and
rebranding myself. This will not be the first time, nor likely the last. As a&amp;nbsp;as/400
specialist, converted to PC technician, converted to Delphi developer, converted to
DBA, converted to Web Developer, and finally to .NET windows/web developer, I can
say that I have definately been through this process before, and it does not scare
me. What scares me is the thought of &lt;em&gt;not&lt;/em&gt; adapting.
&lt;/p&gt;
&lt;p&gt;
Some of the people I know and trust feel that they too have "seen the light". Some
have their own theories about where to be when the music stops playing. My good friend &lt;a href="http://devcow.com/blogs/jdattis/default.aspx" target="_blank"&gt;Scooter&lt;/a&gt; seems
to think that Sharepoint is the entire future. I don't necessarily agree with that.
I have heard similar theories about the grand direction of things from others as well
("Linux&amp;nbsp;is the future!", "Everything will be AJAX!", "OMGZ It's all going to
Pocket PC format!")&amp;nbsp;- most of which I cannot find reason with either. Everyone
seems to agree that the winds are changing,&amp;nbsp;only nobody appears to agree on the
direction. But I have my own ideas and theories and will once again be betting the
next half-decade or longer of my career on that insight. It hasn't let me down in
the past - I trust it will not let me down this time either.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.mindfusioncorp.com/weblog/aggbug.ashx?id=92aaf646-bcf9-4a05-91f0-9ac12749ab1f" /&gt;</description>
      <comments>http://www.mindfusioncorp.com/weblog/CommentView,guid,92aaf646-bcf9-4a05-91f0-9ac12749ab1f.aspx</comments>
      <category>.NET</category>
      <category>General</category>
      <category>Silverlight</category>
      <category>Web 2.0</category>
      <category>WPF</category>
    </item>
    <item>
      <trackback:ping>http://www.mindfusioncorp.com/weblog/Trackback.aspx?guid=4f3d067c-66d2-4182-81fb-c3d297a97148</trackback:ping>
      <pingback:server>http://www.mindfusioncorp.com/weblog/pingback.aspx</pingback:server>
      <pingback:target>http://www.mindfusioncorp.com/weblog/PermaLink,guid,4f3d067c-66d2-4182-81fb-c3d297a97148.aspx</pingback:target>
      <dc:creator>Keith Rome</dc:creator>
      <wfw:comment>http://www.mindfusioncorp.com/weblog/CommentView,guid,4f3d067c-66d2-4182-81fb-c3d297a97148.aspx</wfw:comment>
      <wfw:commentRss>http://www.mindfusioncorp.com/weblog/SyndicationService.asmx/GetEntryCommentsRss?guid=4f3d067c-66d2-4182-81fb-c3d297a97148</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
          <a href="http://blogs.msdn.com/somasegar/archive/2007/04/15/silverlight-the-next-generation-web-media-experiences.aspx">Soma
tells us</a> that WPF/E has finally recieved a more inspiring name. The announcement
was made at the National Association of Broadcasters (NAB) conference in Vegas.
</p>
        <p>
What's the new name? <a href="http://www.microsoft.com/silverlight/" target="_blank">Silverlight</a>.
They even have a slick logo for it:
</p>
        <p>
          <a href="http://www.mindfusioncorp.com/weblog/content/binary/WPFEGetsaName_D4D7/image02.png" atomicselection="true">
            <img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="102" src="http://www.mindfusioncorp.com/weblog/content/binary/WPFEGetsaName_D4D7/image0_thumb.png" width="92" border="0" />
          </a>
        </p>
        <p>
You can also <a href="http://blogs.msdn.com/lokeuei/archive/2007/04/16/microsoft-announces-silverlight.aspx" target="_blank">see
how it stacks up against Flash here</a>.
</p>
        <img width="0" height="0" src="http://www.mindfusioncorp.com/weblog/aggbug.ashx?id=4f3d067c-66d2-4182-81fb-c3d297a97148" />
      </body>
      <title>WPF/E Gets a Name</title>
      <guid isPermaLink="false">http://www.mindfusioncorp.com/weblog/PermaLink,guid,4f3d067c-66d2-4182-81fb-c3d297a97148.aspx</guid>
      <link>http://www.mindfusioncorp.com/weblog/2007/04/16/WPFEGetsAName.aspx</link>
      <pubDate>Mon, 16 Apr 2007 19:09:06 GMT</pubDate>
      <description>&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.msdn.com/somasegar/archive/2007/04/15/silverlight-the-next-generation-web-media-experiences.aspx"&gt;Soma
tells us&lt;/a&gt; that WPF/E has finally recieved a more inspiring name. The announcement
was made at the National Association of Broadcasters (NAB) conference in Vegas.
&lt;/p&gt;
&lt;p&gt;
What's the new name? &lt;a href="http://www.microsoft.com/silverlight/" target=_blank&gt;Silverlight&lt;/a&gt;.
They even have a slick logo for it:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.mindfusioncorp.com/weblog/content/binary/WPFEGetsaName_D4D7/image02.png" atomicselection="true"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=102 src="http://www.mindfusioncorp.com/weblog/content/binary/WPFEGetsaName_D4D7/image0_thumb.png" width=92 border=0&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You can also &lt;a href="http://blogs.msdn.com/lokeuei/archive/2007/04/16/microsoft-announces-silverlight.aspx" target=_blank&gt;see
how it stacks up against Flash here&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.mindfusioncorp.com/weblog/aggbug.ashx?id=4f3d067c-66d2-4182-81fb-c3d297a97148" /&gt;</description>
      <comments>http://www.mindfusioncorp.com/weblog/CommentView,guid,4f3d067c-66d2-4182-81fb-c3d297a97148.aspx</comments>
      <category>.NET</category>
      <category>Silverlight</category>
      <category>Web 2.0</category>
      <category>WPF</category>
    </item>
  </channel>
</rss>