<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>Program With .NET</title>
  <link rel="alternate" type="text/html" href="http://programwith.net/" />
  <link rel="self" href="http://programwith.net/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2008-04-22T21:12:39.5533548-04:00</updated>
  <author>
    <name>Matt Casto</name>
  </author>
  <subtitle>Matt Casto's .NET Journal</subtitle>
  <id>http://programwith.net/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>Crawling Border Animation</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2008/04/22/CrawlingBorderAnimation.aspx" />
    <id>http://programwith.net/PermaLink,guid,c41366fc-ccb3-4d12-8431-b355e6c4b39f.aspx</id>
    <published>2008-04-21T22:55:36.323-04:00</published>
    <updated>2008-04-22T21:12:39.5533548-04:00</updated>
    <category term="silverlight" label="silverlight" scheme="http://programwith.net/CategoryView,category,silverlight.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is a very simple animation that can be used just about anywhere.
</p>
        <p>
          <iframe style="width: 300px; height: 150px" src="http://silverlight.services.live.com/invoke/63993/Crawling%20Border/iframe.html" frameborder="0" scrolling="no">
          </iframe>
        </p>
        <p>
[[ If you're viewing this post through an RSS reader, you won't be able to see the
Silverlight example ]]
</p>
        <p>
Following is my Page.xaml for this example.  There was no code needed.
</p>
        <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
          <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">UserControl</span>
              <span style="color: #ff0000">x:Class</span>
              <span style="color: #0000ff">="AnimationSample.Page"</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #ff0000">xmlns</span>
              <span style="color: #0000ff">="http://schemas.microsoft.com/client/2007"</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #ff0000">xmlns:x</span>
              <span style="color: #0000ff">="http://schemas.microsoft.com/winfx/2006/xaml"</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #ff0000">Width</span>
              <span style="color: #0000ff">="300"</span>
              <span style="color: #ff0000">Height</span>
              <span style="color: #0000ff">="150"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">Grid</span>
              <span style="color: #ff0000">x:Name</span>
              <span style="color: #0000ff">="LayoutRoot"</span>
              <span style="color: #ff0000">Background</span>
              <span style="color: #0000ff">="White"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">Grid.Triggers</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">EventTrigger</span>
              <span style="color: #ff0000">RoutedEvent</span>
              <span style="color: #0000ff">="Grid.Loaded"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">EventTrigger.Actions</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">BeginStoryboard</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">Storyboard</span>
              <span style="color: #ff0000">x:Name</span>
              <span style="color: #0000ff">="CrawlingBorder"</span>
              <span style="color: #ff0000">RepeatBehavior</span>
              <span style="color: #0000ff">="Forever"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">DoubleAnimationUsingKeyFrames</span>
              <span style="color: #ff0000">Storyboard</span>.<span style="color: #ff0000">TargetName</span><span style="color: #0000ff">="rectangle"</span></pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #ff0000">Storyboard</span>.<span style="color: #ff0000">TargetProperty</span><span style="color: #0000ff">="(Shape.StrokeDashOffset)"</span><span style="color: #ff0000">BeginTime</span><span style="color: #0000ff">="00:00:00"</span><span style="color: #0000ff">&gt;</span></pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">SplineDoubleKeyFrame</span>
              <span style="color: #ff0000">KeyTime</span>
              <span style="color: #0000ff">="00:00:00"</span>
              <span style="color: #ff0000">Value</span>
              <span style="color: #0000ff">="0"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">SplineDoubleKeyFrame</span>
              <span style="color: #ff0000">KeyTime</span>
              <span style="color: #0000ff">="00:00:00.5000000"</span>
              <span style="color: #ff0000">Value</span>
              <span style="color: #0000ff">="5"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">DoubleAnimationUsingKeyFrames</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">Storyboard</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">BeginStoryboard</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">EventTrigger.Actions</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">EventTrigger</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">Grid.Triggers</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">Rectangle</span>
              <span style="color: #ff0000">Stroke</span>
              <span style="color: #0000ff">="Green"</span>
              <span style="color: #ff0000">StrokeThickness</span>
              <span style="color: #0000ff">="6"</span>
              <span style="color: #ff0000">StrokeDashArray</span>
              <span style="color: #0000ff">="3,2"</span>
              <span style="color: #ff0000">StrokeDashCap</span>
              <span style="color: #0000ff">="Round"</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #ff0000">Margin</span>
              <span style="color: #0000ff">="20"</span>
              <span style="color: #ff0000">StrokeDashOffset</span>
              <span style="color: #0000ff">="0"</span>
              <span style="color: #ff0000">StrokeLineJoin</span>
              <span style="color: #0000ff">="Round"</span>
              <span style="color: #ff0000">x:Name</span>
              <span style="color: #0000ff">="rectangle"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">Rectangle</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">TextBlock</span>
              <span style="color: #ff0000">FontFamily</span>
              <span style="color: #0000ff">="Lucida
Sans Unicode"</span>
              <span style="color: #ff0000">FontSize</span>
              <span style="color: #0000ff">="24"</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #ff0000">Text</span>
              <span style="color: #0000ff">="Crawling
Border"</span>
              <span style="color: #ff0000">FontWeight</span>
              <span style="color: #0000ff">="Bold"</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #ff0000">HorizontalAlignment</span>
              <span style="color: #0000ff">="Center"</span>
              <span style="color: #ff0000">VerticalAlignment</span>
              <span style="color: #0000ff">="Center"</span>
              <span style="color: #ff0000">Foreground</span>
              <span style="color: #0000ff">="#FFDE680A"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">Grid</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">UserControl</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
          </div>
        </div>
        <img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=c41366fc-ccb3-4d12-8431-b355e6c4b39f" />
      </div>
    </content>
  </entry>
  <entry>
    <title>PresentLight - A Silverlight Presentation Written in Silverlight</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2008/04/22/PresentLightASilverlightPresentationWrittenInSilverlight.aspx" />
    <id>http://programwith.net/PermaLink,guid,92aeb18f-3f9e-452a-9331-d0ee6e99e33c.aspx</id>
    <published>2008-04-21T22:15:26.4009345-04:00</published>
    <updated>2008-04-21T22:15:26.4009345-04:00</updated>
    <category term="silverlight" label="silverlight" scheme="http://programwith.net/CategoryView,category,silverlight.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I gave a talk at the <a href="http://cinnug.org/cododn/">Central Ohio Day of .NET</a> last
Saturday about Silverlight 2.  The presentation was written in Silverlight 2
Beta 1 and included examples of functionality built into Silverlight versions 1 and
2, and the beginning steps in creating the presentation itself.
</p>
        <p>
I have much more planned to be added to the presentation, so I created a CodePlex
project called <a href="http://www.codeplex.com/PresentLight">PresentLight</a>. 
I'm hoping that other people will like the idea of giving a presentation in the technology
that they're speaking about, and maybe they'll use the framework or even add their
own content!
</p>
        <p>
I uploaded a slightly older version than the one I gave at CODoDN to silverlight.live.com,
check it out by clicking on the following preview image.  The XAP is 14 MB so
expect a decent wait for everything to load ... I need to reduce the size.  I'll
update this post with a better example as soon as I have it available.
</p>
        <p>
          <a href="http://silverlight.services.live.com/invoke/63993/PresentLight/iframe.html">
            <img height="325" src="http://programwith.net/images/PresentLightSS.png" width="443" />
          </a>
        </p>
        <p>
Much thanks goes out to <a href="http://www.jeffblankenburg.com/index.html">Jeff Blankenburg</a> for
building the original slide deck that I based this presentation on.  Also, I
got the idea from <a href="http://david.sleeckx.be/?p=12">David Sleeckx</a>'s WPF
presentation, which is an excellent way to get an overview of WPF.
</p>
        <h3>Using the Presentation
</h3>
        <p>
You can navigate the slides through the menu on the left, or move forward one slide
by clicking on the header area.  A few of the slides don't have much at first,
but clicking in the slide area will show text which was talking points for that part
of the presentation.  The interactive slides in the middle should be pretty self
explanatory - you can modify the XAML in most of the examples to see changes in real
time.
</p>
        <p>
The screen shots at the end can be clicked on to view the full size.  I wanted
to keep the entire presentation in Silverlight, so I was trying to use screen shots
instead of jumping into Visual Studio.  These slides were taking over an hour
each to prepare, because I was trying to give each one a different type of animation. 
I think they ended up being a little disjointed though - its much more natural to
see someone working with the environment than seeing screen shots of some code, then
the solution explorer, then XAML.  I'm definitely going to have to give more
thought to that area.
</p>
        <h3>Plans for the Future
</h3>
        <p>
I plan to have the slides stored in data rather than hard coded in the page code behind. 
I'm going to integrate more examples, such as Isolated Storage, Communications with
web services and through sockets, and dynamic languages integrated directly into the
slides, like I did with the XAML examples.
</p>
        <p>
Also, I'm going to expand more on some of the user controls that I created as part
of the application.  I already went into the scrolling textbox control in my
last post, so there will be more of that on the way.
</p>
        <img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=92aeb18f-3f9e-452a-9331-d0ee6e99e33c" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Scrolling TextBox in Silverlight 2 Beta 1</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2008/04/13/ScrollingTextBoxInSilverlight2Beta1.aspx" />
    <id>http://programwith.net/PermaLink,guid,470085fe-abab-4091-a93f-d5d77fb8ecfc.aspx</id>
    <published>2008-04-13T10:41:18.995-04:00</published>
    <updated>2008-04-13T10:53:43.9123668-04:00</updated>
    <category term="silverlight" label="silverlight" scheme="http://programwith.net/CategoryView,category,silverlight.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
The <a href="http://msdn2.microsoft.com/en-us/library/system.windows.controls.textbox(VS.95).aspx">TextBox</a> control
included with Silverlight 2 Beta 1 is a welcome addition.  There was no such
control in previous versions of Silverlight, including the alpha.
</p>
        <p>
Unfortunately, the TextBox control is very limited at this point.  It does not
support scrollbars when it's content is larger than it's size.  You can "scroll"
the next by moving the cursor, but that's just enough to make it functional. 
Selecting text past what's visible doesn't automatically scroll to the cursor. 
Also, there's no text wrapping, although setting the <a href="http://msdn2.microsoft.com/en-us/library/system.windows.controls.textbox.acceptsreturn(VS.95).aspx">AcceptsReturn</a> property
to True will allow line breaks in the text.
</p>
        <p>
I wanted to have a text box with a little more functionality for my projects, so I
decided to see what I could do.  What follows is the simple ScrollingTextBox
control that I created.  I didn't spend a ton of time on this because I fully
expect this "missing" functionality to be included by Beta 2, or at least by the time
Silverlight 2 is released.
</p>
        <iframe src="http://silverlight.services.live.com/invoke/63993/Scrolling%20TextBox%20Control/iframe.html" scrolling="no" frameborder="0" style="width:400px; height:300px">
        </iframe>
        <p>
 
</p>
        <p>
To build this, I first created a Silverlight application project and added a Silverlight
control called ScrollingTextBox.
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">UserControl</span>
          <span class="attr">x:Class</span>
          <span class="kwrd">="PresentLight.ScrollingTextBox"</span>
          <span class="attr">xmlns</span>
          <span class="kwrd">="http://schemas.microsoft.com/client/2007"</span>
          <span class="attr">xmlns:x</span>
          <span class="kwrd">="http://schemas.microsoft.com/winfx/2006/xaml"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Grid</span>
          <span class="attr">x:Name</span>
          <span class="kwrd">="LayoutRoot"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">ScrollViewer</span>
          <span class="attr">x:Name</span>
          <span class="kwrd">="sv"</span>
          <span class="attr">HorizontalScrollBarVisibility</span>
          <span class="kwrd">="Auto"</span>
          <span class="attr">VerticalScrollBarVisibility</span>
          <span class="kwrd">="Auto"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">TextBlock</span>
          <span class="attr">x:Name</span>
          <span class="kwrd">="hiddenTextBlock"</span>
          <span class="attr">Opacity</span>
          <span class="kwrd">="0"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">TextBox</span>
          <span class="attr">x:Name</span>
          <span class="kwrd">="tb"</span>
          <span class="attr">AcceptsReturn</span>
          <span class="kwrd">="True"</span>
          <span class="attr">TextChanged</span>
          <span class="kwrd">="tb_TextChanged"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">ScrollViewer</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Grid</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">UserControl</span>
          <span class="kwrd">&gt;</span>
        </pre>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <p>
The internal <a href="http://msdn2.microsoft.com/en-us/library/system.windows.controls.textblock(VS.95).aspx">TextBlock</a> control
is only there to serve as a way to get the actual size of the text.  TextBlock
controls will automatically resize to fit their contents, so if I keep it's text the
same as the internal textbox control, it will resize accordingly.  The default
value for <a href="http://msdn2.microsoft.com/en-us/library/system.windows.frameworkelement.width(VS.95).aspx">Width</a> and <a href="http://msdn2.microsoft.com/en-us/library/system.windows.frameworkelement.height(VS.95).aspx">Height</a> dependency
properties in Silverlight is Auto, which causes this resize behavior.
</p>
        <p>
Since the <a href="http://msdn2.microsoft.com/en-us/library/system.windows.controls.scrollviewer(VS.95).aspx">ScrollViewer</a> control
automatically set's it's scrollable region to fit it's contents, it will be resized
to fit the internal textblock.  The internal textbox control will automatically
resize to fit it's container, since I haven't set any width or height on it.
</p>
        <p>
Then I added a dependency property for setting the control's Text, which takes care
of setting the textbox's text value.  Finally, I handled the <a href="http://msdn2.microsoft.com/en-us/library/system.windows.controls.textbox.textchanged(VS.95).aspx">TextChanged</a> event
on the internal TextBox control to resize based on my internal TextBlock's size.
</p>
        <pre class="csharpcode">
          <span class="kwrd">using</span> System.Windows; <span class="kwrd">using</span> System.Windows.Controls; <span class="kwrd">namespace</span> PresentLight
{ <span class="kwrd">public</span><span class="kwrd">partial</span><span class="kwrd">class</span> ScrollingTextBox
: UserControl { <span class="kwrd">public</span><span class="kwrd">string</span> Text
{ get { <span class="kwrd">return</span> (<span class="kwrd">string</span>)GetValue(TextProperty);
} set { SetValue(TextProperty, <span class="kwrd">value</span>); tb.Text = <span class="kwrd">value</span>;
} } <span class="kwrd">public</span><span class="kwrd">static</span><span class="kwrd">readonly</span> DependencyProperty
TextProperty = DependencyProperty.Register(<span class="str">"Text"</span>, <span class="kwrd">typeof</span>(<span class="kwrd">string</span>), <span class="kwrd">typeof</span>(ScrollingTextBox), <span class="kwrd">null</span>); <span class="kwrd">public</span> ScrollingTextBox()
{ InitializeComponent(); } <span class="kwrd">private</span><span class="kwrd">void</span> tb_TextChanged(<span class="kwrd">object</span> sender,
TextChangedEventArgs e) { <span class="kwrd">if</span> (hiddenTextBlock != <span class="kwrd">null</span>)
{ hiddenTextBlock.Text = tb.Text; tb.Width = hiddenTextBlock.ActualWidth; tb.Height
= hiddenTextBlock.ActualHeight; } } } }</pre>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <p>
The result is a marginally better control.  There are a lot of possible improvements
for me to make, such as possibly handing the selection changed event on the textbox
to scroll the ScrollViewer to the cursor's position.  That will have to wait
for a future post.
</p>
        <img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=470085fe-abab-4091-a93f-d5d77fb8ecfc" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Silverlight Templates Tip</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2008/04/12/SilverlightTemplatesTip.aspx" />
    <id>http://programwith.net/PermaLink,guid,685207f7-56f7-4aa3-a10a-9d8eac1e7042.aspx</id>
    <published>2008-04-12T18:45:08.7071754-04:00</published>
    <updated>2008-04-12T18:45:08.7071754-04:00</updated>
    <category term="silverlight" label="silverlight" scheme="http://programwith.net/CategoryView,category,silverlight.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I haven't been posting much lately because I've been very busy preparing for my <a href="http://cinnug.org/cododn/sessions.aspx#Creating%20Silverlight%202.0%20Presentation%20in%20Silverlight%202.0">session</a> at
the <a href="http://cinnug.org/cododn/">Central Ohio Day of .NET</a>.  I'm creating
a presentation about Silverlight 2.0 Beta 1, but with a <a href="http://www.youtube.com/watch?v=cWWtb2uDDfE">twist</a> -
the presentation is actually a Silverlight application!
</p>
        <h4>Templates
</h4>
        <p>
For the last day or so I've been working on getting my application's main control
to use templates to define the interface.  This gives me the option to create
multiple "skins" for the application.
</p>
        <p>
To accomplish this, I've been referencing two very excellent tutorials by <a href="http://silverlight.net/learn/tutorials/stylestemplates.aspx">Jesse
Liberty</a> and <a href="http://blogs.msdn.com/sburke/archive/2008/03/22/tutorial-writing-a-templated-silverlight-2-control.aspx">Shawn
Burke</a>.  But, as usual for me, I ran into a problem that sucked up a ton of
time.
</p>
        <h4>The Problem
</h4>
        <p>
I was trying to set up my template to include buttons for navigation between slides. 
I started by building a simple XAML interface for the buttons, like so.
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">StackPanel</span>
          <span class="attr">Orientation</span>
          <span class="kwrd">="Horizontal"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">Height</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Width</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Margin</span>
          <span class="kwrd">="0,0,8,0"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">TextBlock</span>
          <span class="attr">Text</span>
          <span class="kwrd">="First"</span>
          <span class="attr">HorizontalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="attr">VerticalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Button</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">Height</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Width</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Margin</span>
          <span class="kwrd">="0,0,8,0"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">TextBlock</span>
          <span class="attr">Text</span>
          <span class="kwrd">="Prev"</span>
          <span class="attr">HorizontalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="attr">VerticalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Button</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">Height</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Width</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Margin</span>
          <span class="kwrd">="0,0,8,0"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">TextBlock</span>
          <span class="attr">Text</span>
          <span class="kwrd">="Next"</span>
          <span class="attr">HorizontalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="attr">VerticalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Button</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">Height</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Width</span>
          <span class="kwrd">="75"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">TextBlock</span>
          <span class="attr">Text</span>
          <span class="kwrd">="Last"</span>
          <span class="attr">HorizontalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="attr">VerticalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Button</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">StackPanel</span>
          <span class="kwrd">&gt;</span>
        </pre>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <p>
 
</p>
        <p>
And that looks good enough for this example.
</p>
        <p>
          <img src="http://programwith.net/images/TemplateExample1.png" />  
</p>
        <p>
Then I took that same XAML and put it into a template stored in the application resources
(in App.xaml).
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">Application.Resources</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Style</span>
          <span class="attr">x:Key</span>
          <span class="kwrd">="TestTemplate"</span>
          <span class="attr">TargetType</span>
          <span class="kwrd">="pl:Presentation"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Setter</span>
          <span class="attr">Property</span>
          <span class="kwrd">="Template"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Setter.Value</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">ControlTemplate</span>
          <span class="attr">TargetType</span>
          <span class="kwrd">="pl:Presentation"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">StackPanel</span>
          <span class="attr">Orientation</span>
          <span class="kwrd">="Horizontal"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">Height</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Width</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Margin</span>
          <span class="kwrd">="0,0,8,0"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">TextBlock</span>
          <span class="attr">Text</span>
          <span class="kwrd">="First"</span>
          <span class="attr">HorizontalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="attr">VerticalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Button</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">Height</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Width</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Margin</span>
          <span class="kwrd">="0,0,8,0"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">TextBlock</span>
          <span class="attr">Text</span>
          <span class="kwrd">="Prev"</span>
          <span class="attr">HorizontalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="attr">VerticalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Button</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">Height</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Width</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Margin</span>
          <span class="kwrd">="0,0,8,0"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">TextBlock</span>
          <span class="attr">Text</span>
          <span class="kwrd">="Next"</span>
          <span class="attr">HorizontalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="attr">VerticalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Button</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">Height</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Width</span>
          <span class="kwrd">="75"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">TextBlock</span>
          <span class="attr">Text</span>
          <span class="kwrd">="Last"</span>
          <span class="attr">HorizontalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="attr">VerticalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Button</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">StackPanel</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">ControlTemplate</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Setter.Value</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Setter</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Style</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Application.Resources</span>
          <span class="kwrd">&gt;</span>
        </pre>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <p>
And modified my Page.xaml to have my Presentation UserControl class (modeled after
Shawn Burke's tutorial) with the template applied as a style.
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">local:Presentation</span>
          <span class="attr">x:Name</span>
          <span class="kwrd">="PresentationControl"</span>
          <span class="attr">Style</span>
          <span class="kwrd">="{StaticResource
TestTemplate}"</span>
          <span class="kwrd">/&gt;</span>
          <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        </pre>
        <p>
But running this treated me to a browser window that's stuck loading.  My break
point in OnApplyTemplate in my Presentation class never got hit.  Pausing Visual
Studio didn't tell me anything, so I knew it wasn't stuck in a loop.  This had
me stuck for several hours.
</p>
        <h4>The Solution
</h4>
        <p>
What I eventually found was that certain things that are perfectly acceptable XAML
in a user control won't work in a template.  Furthermore, if Silverlight encounters
these elements in the template it just hangs.
</p>
        <p>
The problem XAML was the buttons.  Instead of including your actual buttons in
your template, you should instead create a separate template for the buttons, and
reference that as your button style.
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">Style</span>
          <span class="attr">x:Key</span>
          <span class="kwrd">="TestButton"</span>
          <span class="attr">TargetType</span>
          <span class="kwrd">="Button"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Setter</span>
          <span class="attr">Property</span>
          <span class="kwrd">="Template"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Setter.Value</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">ControlTemplate</span>
          <span class="attr">TargetType</span>
          <span class="kwrd">="Button"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">Width</span>
          <span class="kwrd">="75"</span>
          <span class="attr">Height</span>
          <span class="kwrd">="75"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button.Content</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">ContentPresenter</span>
          <span class="attr">Content</span>
          <span class="kwrd">="{TemplateBinding
Content}"</span>
          <span class="attr">HorizontalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="attr">VerticalAlignment</span>
          <span class="kwrd">="Center"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Button.Content</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Button</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">ControlTemplate</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Setter.Value</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Setter</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Style</span>
          <span class="kwrd">&gt;</span>
        </pre>
        <p>
Then modify the previous template to use the new button template.
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;</span>
          <span class="html">Application.Resources</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Style</span>
          <span class="attr">x:Key</span>
          <span class="kwrd">="TestTemplate"</span>
          <span class="attr">TargetType</span>
          <span class="kwrd">="pl:Presentation"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Setter</span>
          <span class="attr">Property</span>
          <span class="kwrd">="Template"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Setter.Value</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">ControlTemplate</span>
          <span class="attr">TargetType</span>
          <span class="kwrd">="pl:Presentation"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">StackPanel</span>
          <span class="attr">Orientation</span>
          <span class="kwrd">="Horizontal"</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">x:Name</span>
          <span class="kwrd">="FirstButtonElement"</span>
          <span class="attr">Content</span>
          <span class="kwrd">="First"</span>
          <span class="attr">Style</span>
          <span class="kwrd">="{StaticResource
TestButton}"</span>
          <span class="attr">Margin</span>
          <span class="kwrd">="0,0,8,0"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">x:Name</span>
          <span class="kwrd">="PreviousButtonElement"</span>
          <span class="attr">Content</span>
          <span class="kwrd">="Prev"</span>
          <span class="attr">Style</span>
          <span class="kwrd">="{StaticResource
TestButton}"</span>
          <span class="attr">Margin</span>
          <span class="kwrd">="0,0,8,0"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">x:Name</span>
          <span class="kwrd">="NextButtonElement"</span>
          <span class="attr">Content</span>
          <span class="kwrd">="Next"</span>
          <span class="attr">Style</span>
          <span class="kwrd">="{StaticResource
TestButton}"</span>
          <span class="attr">Margin</span>
          <span class="kwrd">="0,0,8,0"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;</span>
          <span class="html">Button</span>
          <span class="attr">x:Name</span>
          <span class="kwrd">="LastButtonElement"</span>
          <span class="attr">Content</span>
          <span class="kwrd">="Last"</span>
          <span class="attr">Style</span>
          <span class="kwrd">="{StaticResource
TestButton}"</span>
          <span class="kwrd">/&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">StackPanel</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">ControlTemplate</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Setter.Value</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Setter</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Style</span>
          <span class="kwrd">&gt;</span>
          <span class="kwrd">&lt;/</span>
          <span class="html">Application.Resources</span>
          <span class="kwrd">&gt;</span>
        </pre>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
        <p>
Finally, this works.  It looks the same, but now I can take the template and
make it look much nicer if I want.
</p>
        <p>
Hopefully this tip will help others working on templating in Silverlight avoid the
pitfalls I ran into.
</p>
        <img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=685207f7-56f7-4aa3-a10a-9d8eac1e7042" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Vista Programs and Features</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2008/03/07/VistaProgramsAndFeatures.aspx" />
    <id>http://programwith.net/PermaLink,guid,cb7daf49-dbdb-44f1-9612-218700bf45a7.aspx</id>
    <published>2008-03-06T22:19:08.996-05:00</published>
    <updated>2008-03-06T06:08:08.5254919-05:00</updated>
    <category term="misc" label="misc" scheme="http://programwith.net/CategoryView,category,misc.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
In Windows XP's <em>Add/Remove Programs</em> you get information about installed applications
such as copyright, version, last run, etc.  At first glance this information
appears to be gone in Windows Vista's <em>Programs and Features</em>.
</p>
        <h4>Where'd the Program Information Go?
</h4>
        <p>
I was recently <a href="http://programwith.net/2008/03/06/Silverlight2Beta1ToolsWontInstall.aspx">trying
to figure out the version of Silverlight that I have installed</a>, but selecting
the item from Programs and Features doesn't tell me anything.  Also, clicking <em>Uninstall</em> immediately
starts the uninstallation without showing me the version, and clicking <em>Change</em> didn't
do anything at all.
</p>
        <p>
I was thinking to myself, "Microsoft wouldn't just remove this information totally
... that would be stupid," so I spent a little more time poking around and found that
you can right click on the column headers, click on More... and get a dialog that
allows you to select other columns to display.
</p>
        <p>
          <img style="border: 0px none ; margin: 0px 0px 0px 25px;" alt="Programs and Features - Choose Columns" src="http://programwith.net/Images/ProgramsAndFeaturesColumns.png" border="0" />
        </p>
        <p>
The information that used to be available by default in Add/Remove Programs is now
displays in these columns.  It sucks that it's apparently hidden from view, but
I guess it didn't take me too long to find it.
</p>
        <h4>Loading
</h4>
        <p>
Another change in Programs and Features is the loading.  Add/Remove Programs
could take a long time to display, but once it did you had everything available. 
Programs and Features loads installed applications bit by bit, and refreshes the screen. 
This is annoying if you've started scrolling down or selected an item before its done
loading, because the refresh causes things to jump around.
</p>
        <p>
While its nice that it loads a lot quicker in Vista, it almost appears to be worse
because it punishes you for trying to use it too quickly.  This reminds me of
how Windows boots a lot more quickly in XP and Vista, but it does more things after
you've logged in so the system really isn't available immediately.  If you click
on the Start menu too quickly it will go away.  Again, punishing you for working
too quickly.
</p>
        <p>
I'd like an OS that keeps up with how fast I want to work.
</p>
        <img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=cb7daf49-dbdb-44f1-9612-218700bf45a7" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Silverlight 2 Beta 1 Tools Won't Install</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2008/03/06/Silverlight2Beta1ToolsWontInstall.aspx" />
    <id>http://programwith.net/PermaLink,guid,a106e915-6b68-46a2-9393-29c87e17695a.aspx</id>
    <published>2008-03-05T21:56:34.704-05:00</published>
    <updated>2008-03-06T21:54:35.6221282-05:00</updated>
    <category term="betas" label="betas" scheme="http://programwith.net/CategoryView,category,betas.aspx" />
    <category term="silverlight" label="silverlight" scheme="http://programwith.net/CategoryView,category,silverlight.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I arrived at work this morning only to find that the Silverlight 2.0 Beta 1 plugin
and some documentation was discovered and available for download.  A few hours
later the SDK and documentation was available, then after the keynote at Mix that
whole lot was officially released.  I couldn't wait to try it out when I got
home.
</p>
        <p>
Unfortunately, the install experience hasn't been good.  I've got the Silverlight
2.0 plugin and SDK installed, but I can't get the tools for Visual Studio 2008 installed. 
Here's step by step what I've done so far.
</p>
        <ol>
          <li>
Downloaded and installed the Silverlight 2 Beta 1 plugin (runtime) without a hitch.</li>
          <li>
Downloaded Silverlight 2 Beta 1 SDK, Silverlight 2 Beta 1 Tools for Visual Studio
2008, and Expression Blend 2.5 March Preview.</li>
          <li>
Uninstalled Silverlight 1.1 Alpha Tools for Visual Studio 2008 and Expression Blend
2 December Preview.</li>
          <li>
Installed Silverlight 2 Beta 1 SDK.</li>
          <li>
Tried to install Silverlight 2 Beta 1 Tools for Visual Studio but got the following
error message:</li>
        </ol>
        <ol>
        </ol>
        <p>
An Error Has Occurred:<br />
Silverlight Tools cannot be installed because one or more of the following conditions
is true: 
</p>
        <p>
1. Visual Studio 2008 RTM is not installed.<br />
2. The Web Authoring feature of Visual Studio is not installed.<br />
3. A previous version of the Silverlight Runtime is installed.<br />
4. A previous version of the Silverlight SDK is installed.<br />
5. The Visual Studio Update KB949325 is installed.<br />
6. A previous version of Silverlight Tools is installed. 
</p>
        <p>
To continue, please install or uninstall the appropriate products and run this installer
again.
</p>
        <li>
Verified what I had installed.  I've got Visual Studio Team System 2008 RTM,
Microsoft Visual Studio Web Authoring Component, Silverlight runtime, Silverlight
2 SDK, Silverlight 1.0 SDK.  Oops, maybe that's the problem?  Also, I didn't
uninstall Silverlight 1.1 Alpha runtime before installing Silverlight 2.0 runtime,
but that shouldn't be a problem.</li>
        <li>
Uninstalled Silverlight runtime and both SDKs, then rebooted for good measure.</li>
        <li>
Installed Silverlight runtime, 2.0 SDK, ran silverlight_chainer.exe again and got
the same error.</li>
        <li>
Did a web search and found <a title="http://blog.steeleprice.net/archive/2008/03/05/1362.aspx" href="http://blog.steeleprice.net/archive/2008/03/05/1362.aspx">http://blog.steeleprice.net/archive/2008/03/05/1362.aspx</a> which
mentions a registry key that needs to be removed, but I don't have that registry key
on my system.</li>
        <p>
At this point I can't find any more information through web searches or in the Silverlight.Net
forums.  I'm posting this problem in the forums with a link here for a complete
description of the problem.
</p>
        <p>
I was really hoping to get few things done in Silverlight 2.0 and posted online tonight,
but I'm kind of stuck and frustrated at this point.
</p>
        <p>
        </p>
        <h3>UPDATE
</h3>
        <p>
        </p>
        <p>
          <a href="http://cornucopia30.blogspot.com/">Chad Campbell</a> responded to my <a href="http://silverlight.net/forums/t/10719.aspx">Silverlight.net
forum post</a> with a solution.  The solution definitely isn't something that
I'd say is obvious, but hey, do whatever works.  I'm just a little surprised
that I'd have more trouble with the beta than the alpha.
</p>
        <p>
A big thanks goes out to Chad for his quick reply.  I'm definitely going to have
to <a href="http://www.manning.com/affiliate/idevaffiliate.php?id=513_100">buy his
book</a> now!
</p>
        <p>
        </p>
        <h4>Oops!
</h4>
        <p>
        </p>
        <p>
Even though the tools are now installed, something is still wrong.  Here's what
I get when I try to create a Silverlight project in Visual Studio 2008.
</p>
        <br />
        <p>
          <img src="http://programwith.net/images/VisualStudioCreateSilverlightProject.png" />
        </p>
        <p>
        </p>
        <h3>Resolution
</h3>
        <p>
It turns out that the Silverlight 2 Tools Beta 1 for Visual Studio 2008 installs the
Silverlight 2 Beta 1 runtime and SDK as part of the package.  This causes a problem
if you already installed the plugin or the SDK.  I uninstalled everything Silverlight
related, then installed silverlight_chainer.exe, this time successfully.  I'm
now ready to go.
</p>
        <img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=a106e915-6b68-46a2-9393-29c87e17695a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Which LINQ Join Do You Prefer?</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2008/02/29/WhichLINQJoinDoYouPrefer.aspx" />
    <id>http://programwith.net/PermaLink,guid,adc8532e-2eeb-458d-8eed-91a5684b8812.aspx</id>
    <published>2008-02-29T15:29:42.882-05:00</published>
    <updated>2008-02-29T15:29:42.8824475-05:00</updated>
    <category term="programming" label="programming" scheme="http://programwith.net/CategoryView,category,programming.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">I just got into a nerd fight with another
developer on my team about which style of LINQ join syntax looks better.<br /><br />
Normally I wouldn't be one to get too worked up about syntax differences like this,
but in this case my code was changed from one to the other for no reason other than
"I don't like the way your wrote it."<br /><br />
Which do you prefer?<br /><br /><img src="http://programwith.net/images/linqjoin1.png" /><br /><br />
or 
<br /><br /><img src="http://programwith.net/images/linqjoin2.png" /><br /><p></p><img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=adc8532e-2eeb-458d-8eed-91a5684b8812" /></div>
    </content>
  </entry>
  <entry>
    <title>How does a Silverlight guy pack?</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2008/02/22/HowDoesASilverlightGuyPack.aspx" />
    <id>http://programwith.net/PermaLink,guid,87cbc537-68d3-45b7-ba9f-fe848ccdc058.aspx</id>
    <published>2008-02-21T21:12:15.752-05:00</published>
    <updated>2008-02-22T11:22:00.9696991-05:00</updated>
    <category term="silverlight" label="silverlight" scheme="http://programwith.net/CategoryView,category,silverlight.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <div style="float: right;">
          <img src="http://programwith.net/images/ugly_silverlight_in_a_box.png" border="0" />
        </div>
I had to response to my <a href="http://brianhprince.blogspot.com/2008/02/farewell.html">soon-to-be-former</a><a href="http://brianhprince.blogspot.com/">boss</a>'
post about <a href="http://brianhprince.blogspot.com/2008/02/how-does-architect-pack.html">how
an architect packs</a> when moving offices.<br /><br />
A Silverlight guy could pack today with some great looking boxes that work with all
major moving trucks, but they won't really hold all of his stuff.  They're kind
of like those XAML boxes, but with huge gaps.  He feels the need to defend his
box choice when compared with the competitor's boxes, which have been in production
for years and total market penetration.<br /><br />
The Silverlight guy would rather wait another month or so, for the 2.0 beta of the
box.  This version will solve all of his packing needs, can be loaded 1000 times
faster than other common boxes and comes with a license allowing it to be used immediately. 
The 2.0 boxes will also feature data cateloguing, content memory, multiple languages
and can be used to build even better composite boxes.  So the Silverlight guy
will probably wait until after the big conference when the new box is supposed to
be announced.<br /><br /><img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=87cbc537-68d3-45b7-ba9f-fe848ccdc058" /></div>
    </content>
  </entry>
  <entry>
    <title>CodeMash and the New Year</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2008/01/20/CodeMashAndTheNewYear.aspx" />
    <id>http://programwith.net/PermaLink,guid,b7af1371-0727-4981-accc-67d9ca296347.aspx</id>
    <published>2008-01-20T09:13:42.628-05:00</published>
    <updated>2008-01-20T09:13:42.6286339-05:00</updated>
    <category term="blog" label="blog" scheme="http://programwith.net/CategoryView,category,blog.aspx" />
    <category term="codemash" label="codemash" scheme="http://programwith.net/CategoryView,category,codemash.aspx" />
    <category term="misc" label="misc" scheme="http://programwith.net/CategoryView,category,misc.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">I haven't stayed on top of this blog because
I've been so busy with so many different things that taking time to write a post seems
to be far down on the priority list.  I'm not going to say that will change this
year, because that's almost cliche, but some of the things on my goal list will naturally
lead to some posts here.<br /><br /><b><font color="#808080" size="4">CodeMash</font></b><br /><br /><a href="http://www.codemash.org">CodeMash v2.0.0.8</a> was awesome.  There have
already been <a href="http://www.hanselman.com/blog/CodeMash2008WrapupWhatAreYouWorkingOn.aspx">so</a><a href="http://blogs.msdn.com/saraford/archive/2008/01/13/a-great-time-at-codemash.aspx">many</a><a href="http://brianhprince.blogspot.com/2008/01/codemash-2008-wrap-up.html">other</a><a href="http://frazzleddad.blogspot.com/2008/01/codemash-summary-coherent-one.html">blog</a><a href="http://www.michaeleatonconsulting.com/blog/archive/2008/01/12/codemash-2.0.0.8.aspx">posts</a><a href="http://jonkruger.com/blog/2008/01/13/why-i-shouldve-gone-to-codemash-last-year/">talking</a><a href="http://melgrubb2.spaces.live.com/blog/cns%212689179BB86492B0%21220.entry">about</a><a href="http://benders-blog.blogspot.com/2008/01/codemash-day-1-part-2.html">how</a><a href="http://blog.timwingfield.com/2008/01/codemash-day-1-morning.html">great</a><a href="http://arnulfowing.blogspot.com/2008/01/kidzmash-codemash.html">it</a><a href="http://aspadvice.com/blogs/ssmith/archive/2008/01/10/CodeMash-Hanselman-IIS-Talk.aspx">was</a>,
so I'm not going to go into detail.  I'll sum it up by saying that it was totally
worth it, and I'd be insane to miss it next year.<br /><br /><b><font color="#808080" size="4">Resolutions</font></b><br /><br />
I have some goals for 2008, but really only one resolution.  My resolution is
to do the <a href="http://westcoastgrid.blogspot.com/2006/12/your-new-years-resolution.html">push-up
a day challenge</a>.  But I decided to also do a sit-up per day, and throw in
jumping jacks to toss in some cardio.  Today I've done 20 of each.  As the
year moves on and things get harder, I may have to only do the exercises every other
day, in order to give my muscles a chance to recover.<br /><p></p><br /><font color="#808080"><b>Goals for 2008</b></font><br /><ul><li>
Present at at least 2 technical user groups</li><li>
Write at least 2 articles for established websites</li><li>
Contribute to a well known open source project</li><li>
Create a fun game in Silverlight and host it at <a href="http://www.codeplex.com/">CodePlex</a></li><li>
Create a custom layout for this blog and port it to <a href="http://www.subtextproject.com/">SubText</a><br /></li></ul><br />
Wow, that's a lot, but I already have one user group talk scheduled.  Should
be a fun year.<br /><img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=b7af1371-0727-4981-accc-67d9ca296347" /></div>
    </content>
  </entry>
  <entry>
    <title>CodeMash Session Scheduler</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2007/12/21/CodeMashSessionScheduler.aspx" />
    <id>http://programwith.net/PermaLink,guid,20f9172d-e9b0-4d21-ac5b-ceaffbba2799.aspx</id>
    <published>2007-12-21T08:42:59.851-05:00</published>
    <updated>2007-12-27T12:34:08.7455241-05:00</updated>
    <category term="codemash" label="codemash" scheme="http://programwith.net/CategoryView,category,codemash.aspx" />
    <category term="silverlight" label="silverlight" scheme="http://programwith.net/CategoryView,category,silverlight.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">I haven't posted in a long time, not because
I haven't wanted to, but because I've been spending every minute of my free time working
on a <a href="http://www.codemash.org/sessionscheduler">Session Scheduler</a> application
for <a href="http://www.codemash.org">CodeMash</a>.<br /><br />
I can now talk about it <a href="http://groups.google.com/group/codemash/browse_thread/thread/edbeb23a7797d1f2?hl=en">because
it's gone live!</a><br /><br />
The session scheduler was written in Silverlight 1.1 Alpha.  I would have written
it in Silverlight 1.0 but I really wanted to be able to use Isolated Storage. 
With Isolated Storage I was able to make the application store any changes the user
makes locally, so the next time you go to the site it will be exactly where you left
it and retain any of the sessions you've scheduled.<br /><br /><b>Using the Session Scheduler</b><br /><br />
The default view of the scheduler shows all sessions and Wednesday.  Unfortunately
I didn't get around to implementing some sort of scrolling for the session list, but
it was low on the list of features since the typical view of the application only
has 6-8 sessions being shown at once.<br /><br />
You can click on the track buttons in the upper left to filter the session list by
that track, or you can click on a session slot on the right (the agenda) and the session
list will filter based on which sessions are available for that time of the day.<br /><br />
If you hover over a session menu item the session's details will drop down. 
From that view, the green button can be used to schedule that session in your agenda. 
Just hovering over the button will automatically show the time slot in the agenda
where that session will occur.  Also, clicking on the speaker's name will show
the speaker's bio.  This will show a picture of the speaker soon, but I'm having
an issue displaying images in there at the moment.<br /><br />
You can click on the link image in the upper right to get a URL that can be used to
send your custom agenda to someone else.  Currently, if you view another person's
custom agenda it will overwrite any changes you've made yourself.  A workaround
for this would be to copy a link to your agenda first, then use it once you're done
looking at the other user's agenda.  I'm currently working on modifying this
to save a history of agendas that you've looked at.<br /><br /><a href="http://www.codemash.org/sessionscheduler/?1=2&amp;2=35&amp;3=24&amp;4=7&amp;5=38&amp;6=34&amp;7=42&amp;8=37">You
can view my schedule here.</a> ;-)<br /><br />
You can also click on the email image to view a simple HTML page with your custom
agenda allowing you to print or email it from there.<br /><br />
I will be following up this post with several more describing the roadblocks I hit,
and how I resolved, or worked around, them.<br /><br /><p></p><img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=20f9172d-e9b0-4d21-ac5b-ceaffbba2799" /></div>
    </content>
  </entry>
  <entry>
    <title>Pair Programming</title>
    <link rel="alternate" type="text/html" href="http://programwith.net/2007/11/21/PairProgramming.aspx" />
    <id>http://programwith.net/PermaLink,guid,3d7e0a11-c1ca-4c54-8c8c-d6d9a0f5d873.aspx</id>
    <published>2007-11-21T12:48:14.95-05:00</published>
    <updated>2007-11-21T12:48:37.4658855-05:00</updated>
    <category term="programming" label="programming" scheme="http://programwith.net/CategoryView,category,programming.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Jeff Atwood's recent post <a href="http://www.codinghorror.com/blog/archives/000999.html">Pair
Programming vs. Code Reviews</a> reminded me that I should post about my recent experience
pair coding.<br /><br />
I spent the majority of the last three weeks pair programming with a co-worker rebuilding
a UI framework that we've used before but lost the source code.  In my opinion,
this was a perfect opportunity to try out pair coding.  We had two people remembering
what types of things we did before, and what kinds of problems we encountered and
wanted to avoid.<br /><br />
The thing that most suprised me about pair coding was how intense it was.  It
was impossible to get distracted because the other person is there keeping you focused. 
It was pretty exhausting compared to a normal day.  The best word I can think
of is relentless.<br /><br />
Also, the quality of what we built is so much higher than I could have accomplished
in the same amount of time.  I definitely think that the work we did was better
than what we could have done working alone.  My partner saved me from writing
so many bugs that I had no idea I was doing.  Granted, most of these would have
been found by the compiler or the first time we tried to run, but I think it saved
a lot of time.<br /><br />
Perhaps the best part of this period of pair programming is that I know everything
that we did, not only my half of what was done if we had been working separately. 
This was a key part of the situation because my co-worker had put his 2 weeks notice
in.  I only hope I have a chance to work with him again.<br /><br />
Would I do it again?  You bet!  I now have no doubt that two developers
can get just as much work done together that they could have done separately, and
I think the quality is much better!<br /><p></p><img width="0" height="0" src="http://programwith.net/aggbug.ashx?id=3d7e0a11-c1ca-4c54-8c8c-d6d9a0f5d873" /></div>
    </content>
  </entry>
</feed>