<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>danielwoolston.com &#187; Uncategorized</title>
	<atom:link href="http://www.danielwoolston.com/?feed=rss2&#038;cat=1" rel="self" type="application/rss+xml" />
	<link>http://www.danielwoolston.com</link>
	<description>.net silverlight hockey sci-fi robotics</description>
	<pubDate>Tue, 30 Mar 2010 03:05:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>webhost4life sucks</title>
		<link>http://www.danielwoolston.com/?p=44</link>
		<comments>http://www.danielwoolston.com/?p=44#comments</comments>
		<pubDate>Tue, 30 Mar 2010 03:05:16 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danielwoolston.com/?p=44</guid>
		<description><![CDATA[i hate them. at one point in time, they were a top notch company. now they&#8217;re inefficient, poorly run and they seriously lack the technical expertise to adequately host a website.
The &#8216;online tech support&#8217; is predictable and useless. Here&#8217;s my latest conversation with them:

Nancy Mills: Hi Daniel. My name is Nancy Mills, how are you [...]]]></description>
			<content:encoded><![CDATA[<p>i hate them. at one point in time, they were a top notch company. now they&#8217;re inefficient, poorly run and they seriously lack the technical expertise to adequately host a website.</p>
<p>The &#8216;online tech support&#8217; is predictable and useless. Here&#8217;s my latest conversation with them:</p>
<blockquote>
<p class="operatorText"><em><span class="operatorName">Nancy Mills: </span>Hi Daniel. My name is Nancy Mills, how are you today?</em></p>
<p class="visitorText"><em><span class="visitorName">daniel: </span>hi nancy. last week our sites went down for 2 straight days. they were brought back up. but now..they&#8217;re back down. can you bring our sites up? if we can&#8217;t have our sites up immediately i&#8217;ve been asked to move the domains from wh4l and immediately close the account.</em></p>
<p><em><span class="operatorName">Nancy Mills: </span>I apologize for any inconvenience this has caused you.</em></p>
<p class="visitorText"><em><span class="visitorName">daniel: </span>i think you guys have that line set to a macro</em></p>
<p class="visitorText"><em><span class="visitorName">daniel: </span>its always the first reply</em></p>
<p class="visitorText"><em><span class="visitorName">daniel: </span>can you bring the site/server back up or do you just &#8216;duplicate the issue&#8217; and create tickets?</em></p>
<p class="operatorText"><em><span class="operatorName">Nancy Mills: </span>I have checked your websites and was able to replicate the issue. Hence, I have re-opened the ticket #6856470 and updated the information you have provided. Our specialist will work on the issue and you should hear from them soon. You can check the status of the Support ticket at <a id="L5524423165046603023" onclick="window.open('http://www.webhost4life.com/member/sconsole','_blank','left=0,top=0,height='+screen.height+',width='+screen.width+',scrollbars=1,resizable=1'); return false;" href="javascript:void(0);">http://www.webhost4life.com/member/sconsole</a> .</em></p>
<p class="operatorText"><em><span class="operatorName">Nancy Mills: </span>One of our specialists will contact you soon with the information. </em></p>
<p class="visitorText"><em><span class="visitorName">daniel: </span>thats what i figured</em></p>
<p class="visitorText"><em><span class="visitorName">daniel: </span>why have online tech support if you cant actually fix anything?</em></p>
</blockquote>
<p class="visitorText">I&#8217;m done with these guys. What a way to run a company into the ground and ruin a great reputation.</p>
<p class="visitorText">
]]></content:encoded>
			<wfw:commentRss>http://www.danielwoolston.com/?feed=rss2&amp;p=44</wfw:commentRss>
		</item>
		<item>
		<title>Arggghhh!</title>
		<link>http://www.danielwoolston.com/?p=39</link>
		<comments>http://www.danielwoolston.com/?p=39#comments</comments>
		<pubDate>Thu, 31 Dec 2009 20:09:43 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danielwoolston.com/?p=39</guid>
		<description><![CDATA[I&#8217;ve neglected my blog for far too long!
I&#8217;ll be back with posts on Silverlight, Hockey and Photography.

]]></description>
			<content:encoded><![CDATA[<p><strong>I&#8217;ve neglected my blog for far too long!<br />
I&#8217;ll be back with posts on Silverlight, Hockey and Photography.<br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielwoolston.com/?feed=rss2&amp;p=39</wfw:commentRss>
		</item>
		<item>
		<title>ice-t destroys a mac</title>
		<link>http://www.danielwoolston.com/?p=38</link>
		<comments>http://www.danielwoolston.com/?p=38#comments</comments>
		<pubDate>Sun, 09 Aug 2009 14:34:56 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danielwoolston.com/?p=38</guid>
		<description><![CDATA[So Ice-T feels the same away about Apple products that I do:
WARNING! - Bad Language and PC Destruction!

awesome.
]]></description>
			<content:encoded><![CDATA[<p>So Ice-T feels the same away about Apple products that I do:</p>
<p><strong>WARNING! - Bad Language and PC Destruction!</strong><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/_qWhYlhfWCI&amp;hl=en&amp;fs=1&amp;" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/_qWhYlhfWCI&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielwoolston.com/?feed=rss2&amp;p=38</wfw:commentRss>
		</item>
		<item>
		<title>critical expression blend error</title>
		<link>http://www.danielwoolston.com/?p=35</link>
		<comments>http://www.danielwoolston.com/?p=35#comments</comments>
		<pubDate>Tue, 23 Jun 2009 21:40:19 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danielwoolston.com/?p=35</guid>
		<description><![CDATA[I really hate this error:

Its frustrating and deflating. My xaml compiles, runs and looks ok but opening the page in Blend crashes it every single time. Other pages load just fine. Guess I&#8217;ll break the page down with comments and find the offending code. My best guess is a style reference..but I wouldn&#8217;t know, given [...]]]></description>
			<content:encoded><![CDATA[<p>I really hate this error:</p>
<p><img src="http://www.danielwoolston.com/wp-content/images/fixblend.JPG" alt="" /></p>
<p>Its frustrating and deflating. My xaml compiles, runs and looks ok but opening the page in Blend crashes it every single time. Other pages load just fine. Guess I&#8217;ll break the page down with comments and find the offending code. My best guess is a style reference..but I wouldn&#8217;t know, given the craptastic error shown.<br />
Sure hope this is fixed in Blend 3.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielwoolston.com/?feed=rss2&amp;p=35</wfw:commentRss>
		</item>
		<item>
		<title>IValueConverter and Silverlight databinding</title>
		<link>http://www.danielwoolston.com/?p=34</link>
		<comments>http://www.danielwoolston.com/?p=34#comments</comments>
		<pubDate>Fri, 19 Jun 2009 03:53:52 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danielwoolston.com/?p=34</guid>
		<description><![CDATA[The code here is based on Silverlight 2 technology.
One of the key features for Silverlight that I’ve made extensive use of lately is the ability to include an IValueConverter in the databinding process. Recently I had an issue with the Silverlight DataGrid and the DataGridTextColumn. I wanted to override FontWeight property of my bound text [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">The code here is based on Silverlight 2 technology.</p>
<p class="MsoNormal">One of the key features for Silverlight that I’ve made extensive use of lately is the ability to include an <strong>IValueConverter</strong> in the databinding process. Recently I had an issue with the Silverlight DataGrid and the <strong><span lang="EN">DataGridTextColumn. </span></strong><strong><span lang="EN">I wanted to override </span></strong><strong><span lang="EN">FontWeight</span></strong><strong><span lang="EN"> property of my bound text column but was getting an AG_E PARSER error. Silverlight wasn’t up for having the </span></strong><strong><span lang="EN">FontWeight</span></strong><strong><span lang="EN"> property bound to anything aside from a declarative value. Let me show you the process I worked through to get the right results:</span></strong></p>
<p class="MsoNormal"><strong><span lang="EN">First..the basic non-bold app:</span></strong></p>
<p><strong> </strong></p>
<p><strong><img src="http://www.danielwoolston.com/wp-content/images/1stDataGridBound.JPG" alt="" /></strong><strong></strong><br />
<!-- code formatted by http://manoli.net/csharpformat/ --></p>
<pre class="csharpcode"><strong>
Page.xaml.cs</strong></pre>
<pre class="csharpcode">using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace SilverlightValueConversion
{
    public partial class Page : UserControl
    {
        public Page()
        {
            InitializeComponent();
        }
    }

    public class EmailMessageList : ObservableCollection<span class="kwrd">&lt;</span><span class="html">EmailMessage</span><span class="kwrd">&gt;</span>
    {
        public EmailMessageList()
            : base()
        {
           Add(new EmailMessage(&#8221;Gordie Howe&#8221;, &#8220;What happened?&#8221;, false));
           Add(new EmailMessage(&#8221;Chris Osgood&#8221;, &#8220;@$###$% @#$##!&#8221;, true));
           Add(new EmailMessage(&#8221;Gary Bettman&#8221;, &#8220;Wahoooo!&#8221;, false));

        }
    }

    public class EmailMessage
    {
        private string _fromName;
        private string _message;
        private bool _isNew;

        public EmailMessage(string from, string body, bool newmessage)
        {
            this._fromName = from;
            this._message = body;
            this._isNew = newmessage;
        }

        public string FromName
        {
            get {return _fromName;}
            set {_fromName = value;}
        }

        public string Message
        {
            get { return _message; }
            set { _message = value; }
        }

        public bool IsNew
        {
            get { return _isNew; }
            set { _isNew = value; }
        }
    }
}

<strong>Page.xaml</strong>
<span class="kwrd">&lt;</span><span class="html">UserControl</span> <span class="attr">xmlns:data</span><span class="kwrd">=&#8221;clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data&#8221;</span>  <span class="attr">x:Class</span><span class="kwrd">=&#8221;SilverlightValueConversion.Page&#8221;</span>
    <span class="attr">xmlns</span><span class="kwrd">=&#8221;http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;</span>
    <span class="attr">xmlns:x</span><span class="kwrd">=&#8221;http://schemas.microsoft.com/winfx/2006/xaml&#8221;</span>
    <span class="attr">xmlns:app</span><span class="kwrd">=&#8221;clr-namespace:SilverlightValueConversion&#8221;</span>
    <span class="attr">Width</span><span class="kwrd">=&#8221;400&#8243;</span> <span class="attr">Height</span><span class="kwrd">=&#8221;200&#8243;</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">UserControl.Resources</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">app:EmailMessageList</span> <span class="attr">x:Key</span><span class="kwrd">=&#8221;MessageListData&#8221;</span><span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">UserControl.Resources</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">=&#8221;LayoutRoot&#8221;</span> <span class="attr">Background</span><span class="kwrd">=&#8221;Silver&#8221;</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">data:DataGrid</span> <span class="attr">x:Name</span><span class="kwrd">=&#8221;dgMessages&#8221;</span>
              <span class="attr">AutoGenerateColumns</span><span class="kwrd">=&#8221;False&#8221;</span>
              <span class="attr">ItemsSource</span><span class="kwrd">=&#8221;{Binding Source={StaticResource MessageListData}}&#8221;</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">data:DataGrid.Columns</span><span class="kwrd">&gt;</span>
                <span class="kwrd">&lt;</span><span class="html">data:DataGridTextColumn</span> <span class="attr">Header</span><span class="kwrd">=&#8221;From&#8221;</span>
                <span class="attr">Binding</span><span class="kwrd">=&#8221;{Binding FromName}&#8221;</span> <span class="kwrd">/&gt;</span>
                <span class="kwrd">&lt;</span><span class="html">data:DataGridTextColumn</span> <span class="attr">Header</span><span class="kwrd">=&#8221;Message&#8221;</span>
                <span class="attr">Binding</span><span class="kwrd">=&#8221;{Binding Message}&#8221;</span> <span class="kwrd">/&gt;</span>
            <span class="kwrd">&lt;/</span><span class="html">data:DataGrid.Columns</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">data:DataGrid</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>
<p class="MsoNormal"><span lang="EN"><br />
If you look at the data source that I’ve thrown together, you’ll see that there is also a field for <strong>IsNew</strong>, indicating that the message is fresh and unread. Wouldn’t it be great if we could turn the font of the new messages to <strong>BOLD</strong>? We’re accustomed to having that functionality in our messaging clients so it would be great if we could duplicate that here. To accomplish in place conversion of bound properties, we’ll use an IValueConverter class. The simple description of the conversion process is that we send in an object, interrogate it and return a different value for binding.<br />
This is the code for modifying the <strong>FontWeight</strong> property:</span></p>
<pre class="csharpcode">    public class FontConverter : IValueConverter
    {
        public object Convert(object value,
                              Type targetType,
                              object parameter,
                              System.Globalization.CultureInfo culture)
        {
            if (value != null)
            {
                bool isNew = (bool)value;
                return isNew ? FontWeights.Bold : FontWeights.Normal;
            }
            else
            {
                return FontWeights.Normal;
            }
        }

        public object ConvertBack(object value,
                                  Type targetType,
                                  object parameter,
                                  System.Globalization.CultureInfo culture)
        {
            return null;
        }
    }</pre>
<p class="MsoNormal"><span lang="EN">We send in our bound “IsNew” boolean field and it sends out the appropriate <strong>FontWeight</strong> enumerated value for binding. Now lets turn our attention to the implementation of the FontConverter.<br />
To expose the class to our xaml code, we add a short entry to our Resources tag:</span></p>
<p class="MsoNormal"><span><span> </span></span><span>&lt;</span><span>UserControl.Resources</span><span>&gt;</span></p>
<p class="MsoNormal"><span><span> </span></span><span>&lt;</span><span>app</span><span>:</span><span>EmailMessageList</span><span> x</span><span>:</span><span>Key</span><span>=&#8221;MessageListData&#8221;/&gt;</span></p>
<p class="MsoNormal"><span><span> </span></span><span>&lt;</span><span>app</span><span>:</span><span>FontConverter</span><span> x</span><span>:</span><span>Key</span><span>=&#8221;fontconverter&#8221;/&gt;</span></p>
<p class="MsoNormal"><span><span> </span></span><span>&lt;/</span><span>UserControl.Resources</span><span>&gt;</span></p>
<p class="MsoNormal"><span lang="EN"><br />
And then it’s just a matter of working out the binding:</span></p>
<p><span>&lt;</span><span>data</span><span>:</span><span>DataGridTemplateColumn</span><span> Header</span><span>=&#8221;From&#8221;&gt;</span></p>
<p class="MsoNormal"><span> &lt;</span><span>data</span><span>:</span><span>DataGridTemplateColumn.CellTemplate</span><span>&gt;</span></p>
<p class="MsoNormal"><span> <span>&lt;</span><span>DataTemplate</span><span>&gt;</span></span></p>
<p class="MsoNormal"><span> <span>&lt;</span><span>TextBlock</span><span> Text</span><span>=&#8221;{</span><span>Binding</span><span> FromName</span><span>}&#8221;</span></span></p>
<p class="MsoNormal"><span><span> <span>FontWeight</span><span>=&#8221;{</span><span>Binding</span><span> IsNew</span><span>,</span></span></span></p>
<p class="MsoNormal"><span><span> <span>Converter</span><span>={</span><span>StaticResource</span><span> fontconverter</span><span>}}&#8221; /&gt;</span></span></span></p>
<p class="MsoNormal"><span> <span>&lt;/</span><span>DataTemplate</span><span>&gt;</span></span></p>
<p class="MsoNormal"><span> <span>&lt;/</span><span>data</span><span>:</span><span>DataGridTemplateColumn.CellTemplate</span><span>&gt;</span></span></p>
<p class="MsoNormal"><span>&lt;/</span><span>data</span><span>:</span><span>DataGridTemplateColumn</span><span>&gt;</span></p>
<p class="MsoNormal"><span lang="EN"> </span></p>
<p class="MsoNormal"><span lang="EN">The converter class is called during the binding process, referencing the StaticResource <strong>fontconverter</strong> class. The <strong>IsNew</strong> property becomes a parameter for the call and the output is bound to <strong>FontWeight</strong>.</span></p>
<p class="MsoNormal"><span lang="EN">Note that we’re using a <strong>DataGridTemplateColumn</strong> to do the binding now. Couldn’t we just use the previously used <strong>DataGridTextColumn</strong> and bind to the <strong>FontWeight</strong> Property? I’m glad you asked.<br />
Let try that:<br />
</span><span><br />
&lt;</span><span>data</span><span>:</span><span>DataGridTextColumn</span><span> </span></p>
<p class="MsoNormal"><span><span> Header</span><span>=&#8221;From&#8221;</span></span></p>
<p class="MsoNormal"><span><span> Binding</span><span>=&#8221;{</span><span>Binding</span><span> FromName</span><span>}&#8221;</span></span></p>
<p class="MsoNormal"><span><span> FontWeight</span><span>=&#8221;{</span><span>Binding</span><span> IsNew</span><span>,</span></span></p>
<p class="MsoNormal"><span><span> Converter</span><span>={</span><span>StaticResource</span><span> fontconverter</span><span>}}&#8221;&gt;</span></span></p>
<p class="MsoNormal"><span><span> </span></span><span>&lt;/</span><span>data</span><span>:</span><span>DataGridTextColumn</span><span>&gt;</span></p>
<p class="MsoNormal"><span lang="EN"><br />
If we add this and run it, we’ll get this very informative message:</span></p>
<p><img src="http://www.danielwoolston.com/wp-content/images/databoundError.JPG" alt="" /></p>
<p>So yeah…you’ll want to use the <strong>DataGridTemplateColumn</strong> instead.</p>
<p class="MsoNormal"><span lang="EN">So here’s the complete <span> </span>working code:</span></p>
<pre class="csharpcode"><strong>Page.xaml
</strong><span class="kwrd">&lt;</span><span class="html">UserControl</span> <span class="attr">xmlns:data</span><span class="kwrd">=&#8221;clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data&#8221;</span>  <span class="attr">x:Class</span><span class="kwrd">=&#8221;SilverlightValueConversion.Page&#8221;</span>
    <span class="attr">xmlns</span><span class="kwrd">=&#8221;http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;</span>
    <span class="attr">xmlns:x</span><span class="kwrd">=&#8221;http://schemas.microsoft.com/winfx/2006/xaml&#8221;</span>
    <span class="attr">xmlns:app</span><span class="kwrd">=&#8221;clr-namespace:SilverlightValueConversion&#8221;</span>
    <span class="attr">Width</span><span class="kwrd">=&#8221;400&#8243;</span> <span class="attr">Height</span><span class="kwrd">=&#8221;200&#8243;</span><span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;</span><span class="html">UserControl.Resources</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">app:EmailMessageList</span> <span class="attr">x:Key</span><span class="kwrd">=&#8221;MessageListData&#8221;</span><span class="kwrd">/&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">app:FontConverter</span> <span class="attr">x:Key</span><span class="kwrd">=&#8221;fontconverter&#8221;</span><span class="kwrd">/&gt;</span>
    <span class="kwrd">&lt;/</span><span class="html">UserControl.Resources</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">=&#8221;LayoutRoot&#8221;</span> <span class="attr">Background</span><span class="kwrd">=&#8221;Silver&#8221;</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;</span><span class="html">data:DataGrid</span> <span class="attr">x:Name</span><span class="kwrd">=&#8221;dgMessages&#8221;</span>
              <span class="attr">AutoGenerateColumns</span><span class="kwrd">=&#8221;False&#8221;</span>
              <span class="attr">ItemsSource</span><span class="kwrd">=&#8221;{Binding Source={StaticResource MessageListData}}&#8221;</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;</span><span class="html">data:DataGrid.Columns</span><span class="kwrd">&gt;</span>
                <span class="kwrd">&lt;</span><span class="html">data:DataGridTemplateColumn</span> <span class="attr">Header</span><span class="kwrd">=&#8221;From&#8221;</span><span class="kwrd">&gt;</span>
                    <span class="kwrd">&lt;</span><span class="html">data:DataGridTemplateColumn.CellTemplate</span><span class="kwrd">&gt;</span>
                        <span class="kwrd">&lt;</span><span class="html">DataTemplate</span><span class="kwrd">&gt;</span>
                            <span class="kwrd">&lt;</span><span class="html">TextBlock</span> <span class="attr">Text</span><span class="kwrd">=&#8221;{Binding FromName}&#8221;</span>
                               <span class="attr">FontWeight</span><span class="kwrd">=&#8221;{Binding IsNew,
                                Converter={StaticResource fontconverter}}&#8221;</span> <span class="kwrd">/&gt;</span>
                        <span class="kwrd">&lt;/</span><span class="html">DataTemplate</span><span class="kwrd">&gt;</span>
                    <span class="kwrd">&lt;/</span><span class="html">data:DataGridTemplateColumn.CellTemplate</span><span class="kwrd">&gt;</span>
                <span class="kwrd">&lt;/</span><span class="html">data:DataGridTemplateColumn</span><span class="kwrd">&gt;</span>
                <span class="kwrd">&lt;</span><span class="html">data:DataGridTemplateColumn</span> <span class="attr">Header</span><span class="kwrd">=&#8221;Message&#8221;</span><span class="kwrd">&gt;</span>
                    <span class="kwrd">&lt;</span><span class="html">data:DataGridTemplateColumn.CellTemplate</span><span class="kwrd">&gt;</span>
                        <span class="kwrd">&lt;</span><span class="html">DataTemplate</span><span class="kwrd">&gt;</span>
                            <span class="kwrd">&lt;</span><span class="html">TextBlock</span> <span class="attr">Text</span><span class="kwrd">=&#8221;{Binding Message}&#8221;</span>
                               <span class="attr">FontWeight</span><span class="kwrd">=&#8221;{Binding IsNew,
                                Converter={StaticResource fontconverter}}&#8221;</span> <span class="kwrd">/&gt;</span>
                        <span class="kwrd">&lt;/</span><span class="html">DataTemplate</span><span class="kwrd">&gt;</span>
                    <span class="kwrd">&lt;/</span><span class="html">data:DataGridTemplateColumn.CellTemplate</span><span class="kwrd">&gt;</span>
                <span class="kwrd">&lt;/</span><span class="html">data:DataGridTemplateColumn</span><span class="kwrd">&gt;</span>
            <span class="kwrd">&lt;/</span><span class="html">data:DataGrid.Columns</span><span class="kwrd">&gt;</span>
        <span class="kwrd">&lt;/</span><span class="html">data:DataGrid</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>

<strong>Page.xaml.cs
</strong>using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.Windows.Data;

namespace SilverlightValueConversion
{
    public partial class Page : UserControl
    {
        public Page()
        {
            InitializeComponent();
        }
    }

    public class EmailMessageList : ObservableCollection<span class="kwrd">&lt;</span><span class="html">EmailMessage</span><span class="kwrd">&gt;</span>
    {
        public EmailMessageList()
            : base()
        {
           Add(new EmailMessage(&#8221;Gordie Howe&#8221;, &#8220;What happened?&#8221;, false));
           Add(new EmailMessage(&#8221;Chris Osgood&#8221;, &#8220;@$###$% @#$##!&#8221;, true));
           Add(new EmailMessage(&#8221;Gary Bettman&#8221;, &#8220;Wahoooo!&#8221;, false));

        }
    }

    public class EmailMessage
    {
        private string _fromName;
        private string _message;
        private bool _isNew;

        public EmailMessage(string from, string body, bool newmessage)
        {
            this._fromName = from;
            this._message = body;
            this._isNew = newmessage;
        }

        public string FromName
        {
            get {return _fromName;}
            set {_fromName = value;}
        }

        public string Message
        {
            get { return _message; }
            set { _message = value; }
        }

        public bool IsNew
        {
            get { return _isNew; }
            set { _isNew = value; }
        }
    }

    public class FontConverter : IValueConverter
    {
        public object Convert(object value,
                              Type targetType,
                              object parameter,
                              System.Globalization.CultureInfo culture)
        {
            if (value != null)
            {
                bool isNew = (bool)value;
                return isNew ? FontWeights.Bold : FontWeights.Normal;
            }
            else
            {
                return FontWeights.Normal;
            }
        }

        public object ConvertBack(object value,
                                  Type targetType,
                                  object parameter,
                                  System.Globalization.CultureInfo culture)
        {
            return null;
        }
    }
}</pre>
<p>We run the complete code to get our working grid:</p>
<p><img src="http://www.danielwoolston.com/wp-content/images/workingGrid.JPG" alt="" /></p>
<p>Obviously the grid could use some styling love, but this should get you started on using the <strong>IValueConverter</strong>. Keep in mind that you can use this thing for quite a few other binding tasks:</p>
<p class="MsoListParagraphCxSpFirst"><span lang="EN"><span>·<span> </span></span></span><span lang="EN">Dynamically set coloring based on database properties</span></p>
<p class="MsoListParagraphCxSpMiddle"><span lang="EN"><span>·<span> </span></span></span><span lang="EN">Compile DateTime fields into custom descriptors</span></p>
<p class="MsoListParagraphCxSpMiddle"><span lang="EN"><span>·<span> </span></span></span><span lang="EN">Conditional testing and output</span></p>
<p class="MsoListParagraphCxSpLast"><span lang="EN"><span>·<span> </span></span></span><span lang="EN">many, many more…</span></p>
<p class="MsoNormal"><span lang="EN">You can download my <a href="http://www.danielwoolston.com/wp-content/images/SilverlightValueConversion.zip" target="_blank">sample solution file HERE.</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielwoolston.com/?feed=rss2&amp;p=34</wfw:commentRss>
		</item>
		<item>
		<title>Quick config for Silverlight in SharePoint 2007</title>
		<link>http://www.danielwoolston.com/?p=33</link>
		<comments>http://www.danielwoolston.com/?p=33#comments</comments>
		<pubDate>Tue, 02 Jun 2009 19:00:26 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danielwoolston.com/?p=33</guid>
		<description><![CDATA[As promised during the Sharepoint User Group presentation on Silverlight in SharePoint:
Configuring SharePoint for Silverlight Development Checklist(&#8217;ish)
PreReq&#8217;s:

Windows 2008 OS installed and running with appropriate roles/features
SQL Server installed and runningWSS 3.0(sp&#8217;d)
Visual Studio 2008(sp&#8217;d)
VseWSS (1.2 or later):
http://www.microsoft.com/downloads/details.aspx?FamilyID=7bf65b28-06e2-4e87-9bad-086e32185e68&#38;displaylang=en
Create your Web Application and a Test Site.
Test that your site works.

I&#8217;d recommend backing up your VHD at this point, just [...]]]></description>
			<content:encoded><![CDATA[<p>As promised during the Sharepoint User Group presentation on Silverlight in SharePoint:</p>
<h2>Configuring SharePoint for Silverlight Development Checklist(&#8217;ish)</h2>
<p><strong>PreReq&#8217;s:</strong></p>
<ul>
<li>Windows 2008 OS installed and running with appropriate roles/features</li>
<li>SQL Server installed and runningWSS 3.0(sp&#8217;d)</li>
<li>Visual Studio 2008(sp&#8217;d)</li>
<li>VseWSS (1.2 or later):<br />
http://www.microsoft.com/downloads/details.aspx?FamilyID=7bf65b28-06e2-4e87-9bad-086e32185e68&amp;displaylang=en</li>
<li>Create your Web Application and a Test Site.</li>
<li>Test that your site works.</li>
</ul>
<p>I&#8217;d recommend <strong>backing up your VHD</strong> at this point, just in case things go awry. And they will. Especially the night before your demo the technology. Not that I&#8217;m speaking from experience or anything.</p>
<h2>Silverlight Preparation</h2>
<ul>
<li>Install Silverlight Tools and the Toolkit:<br />
http://www.silverlight.net/GetStarted/</li>
<li>Make sure that your IIS installation has the MIME type for the .xap extension:<br />
Extension: .xap<br />
MIME type: application/x-silverlight-app</li>
<li>GAC the Silverlight .dll *:<br />
The .dll is most likely located at:<br />
C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Server</li>
<li>use Gacutil or filesystem to get the dll into Windows\assembly
<p>*don&#8217;t forget to do this as Administrator.</li>
</ul>
<h4>Configure the Web.Config file:</h4>
<h2 style="text-align: center;"><strong>Backup your sites web.config file!</strong></h2>
<p><span> </span>Here&#8217;s a trick that worked on my new vhd and if it doesn&#8217;t work for you, hit the web and</p>
<p>search for &#8216;configuring sharepoint for silverlight&#8217; and you&#8217;ll find the hard .config entries for the complete file. In an attempt to do a quick ramp up of the process, try this:</p>
<p><span> </span></p>
<p><span> </span>Open Visual Studio 2008.</p>
<p><span> </span>Create a new Web Site, targeting the 2.0 Framework:<br />
<img src="http://www.danielwoolston.com/wp-content/images/website2.png" alt="" /></p>
<p><span> </span>Open the new sites web.config file and delete the contents.</p>
<p><span> </span>Copy the entire contents from your SharePoint web.config file to the site&#8217;s file.</p>
<p><span> </span>Save it.</p>
<p><span> </span>Right click on the site project file and select PropertyPages.</p>
<p><span> </span>Click on Build and change the targeted framework to 3.5:<br />
<img src="http://www.danielwoolston.com/wp-content/images/target-framework.png" alt="" /><br />
<span> </span>Add the next few options to the sections as noted:</p>
<p><span> </span>&lt;system.web&gt;&lt;compilation&gt;&lt;assemblies&gt; :</p>
<p><strong>&lt;add assembly=&#8221;System.Web.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&#8243; /&gt;</strong></p>
<p>&lt;system.web&gt;&lt;pages&gt;&lt;controls&gt;:</p>
<p><strong>&lt;add tagPrefix=&#8221;asp&#8221; namespace=&#8221;System.Web.UI.SilverlightControls&#8221; assembly=&#8221;System.Web.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&#8243; /&gt;</strong></p>
<p><span> </span>Copy the config contents over to your SharePoint web.config file, replacing the</p>
<p><span> </span>contents. Save the file.</p>
<p><span> </span>Reset IIS.</p>
<p><span> </span>Your Sharepoint environment should be ready to rock and roll the Silverlight development.</p>
<p>My next post will cover a short Silverlight web part built and deployed to SharePoint. Stay Tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielwoolston.com/?feed=rss2&amp;p=33</wfw:commentRss>
		</item>
		<item>
		<title>Absolutely Amazing Technology</title>
		<link>http://www.danielwoolston.com/?p=32</link>
		<comments>http://www.danielwoolston.com/?p=32#comments</comments>
		<pubDate>Tue, 02 Jun 2009 05:13:24 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danielwoolston.com/?p=32</guid>
		<description><![CDATA[Project Natal is an Xbox 360 add on device that uses a wii-like sensor/camera bar to interact with the real world. no controller is needed. you simply move and talk to the software. Milo, a software product coming to the Xbox is simply amazing. Watch the interaction between the actor and the game:
 
]]></description>
			<content:encoded><![CDATA[<p>Project Natal is an Xbox 360 add on device that uses a wii-like sensor/camera bar to interact with the real world. no controller is needed. you simply move and talk to the software. Milo, a software product coming to the Xbox is simply amazing. Watch the interaction between the actor and the game:</p>
<p> <object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/dWnZOseA3Lw&#038;hl=en&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/dWnZOseA3Lw&#038;hl=en&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielwoolston.com/?feed=rss2&amp;p=32</wfw:commentRss>
		</item>
		<item>
		<title>Silverlight Presentation</title>
		<link>http://www.danielwoolston.com/?p=29</link>
		<comments>http://www.danielwoolston.com/?p=29#comments</comments>
		<pubDate>Wed, 13 May 2009 21:43:49 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danielwoolston.com/?p=29</guid>
		<description><![CDATA[
I&#8217;ll be speaking at the West Michigan .Net User Group on June 9th.
Details:
Location:
GVSU Pew Campus
Kennedy Hall of Engineering
Room #330, Building #7
Time: 6:45 p.m.
Topic: Silverlight in the Enterprise
Summary:
In this session, we&#8217;ll move beyond the &#8216;What is Silverlight&#8217; conversation and examine how the technology can be embraced by enterprise application developers. We&#8217;ll discuss leveraging the tools that [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.wmdotnet.org/Portals/0/Skins/WMDotNet/images/GRDotNetLogo.gif" alt="" /></p>
<p>I&#8217;ll be speaking at the <a href="http://www.wmdotnet.org/" target="_blank">West Michigan .Net User Group</a> on June 9th.<br />
Details:</p>
<p><strong>Location</strong>:<br />
GVSU Pew Campus<br />
Kennedy Hall of Engineering<br />
Room #330, Building #7</p>
<p><strong>Time</strong>: 6:45 p.m.</p>
<p><strong>Topic: Silverlight in the Enterprise</strong></p>
<p><strong>Summary</strong>:</p>
<p>In this session, we&#8217;ll move beyond the &#8216;What is Silverlight&#8217; conversation and examine how the technology can be embraced by enterprise application developers. We&#8217;ll discuss leveraging the tools that you may already have in the workplace and how Silverlight can fit into typical n-tier architecture. A majority of the presentation will involve Silverlight coding, demonstrating a few of the various tasks that we often find ourselves repeating when building corporate applications (Grids, Data Entry, Validation, etc&#8230;)</p>
<p>hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielwoolston.com/?feed=rss2&amp;p=29</wfw:commentRss>
		</item>
		<item>
		<title>YACW7T - Number 2</title>
		<link>http://www.danielwoolston.com/?p=28</link>
		<comments>http://www.danielwoolston.com/?p=28#comments</comments>
		<pubDate>Tue, 05 May 2009 06:15:41 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danielwoolston.com/?p=28</guid>
		<description><![CDATA[Yet Another Cool Windows 7 Thing - Number 2:
I keep my eeePC 1000he netbook readily available during most of the day. If you&#8217;re like me, you occassionally like to jot down ideas and solutions as they come to you. Typically its an inconvenient time when this happens as inspiration knows no schedule. I&#8217;ve been known [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Yet Another Cool Windows 7 Thing - Number 2:</strong></p>
<p>I keep my eeePC 1000he netbook readily available during most of the day. If you&#8217;re like me, you occassionally like to jot down ideas and solutions as they come to you. Typically its an inconvenient time when this happens as inspiration knows no schedule. I&#8217;ve been known to keep various moleskin notebooks strewn about that I purpose for just such an event. And that&#8217;s great for ease of access but horrible for recall and actionable manipulation of the text. I&#8217;ve always wished that I could simply jot things down on my Sony laptop, but by the time the pc started, got logged in, waited for all the junk services to start; I would have grown frustrated with the wait or simply forgot what it was I felt inspired to write in the first place.</p>
<p><strong>ENTER Windows 7 on a Netbook!</strong></p>
<p>I was able to enter this small note in less than 15 seconds:<br />
<img src="http://www.danielwoolston.com/wp-content/images/quickNote.JPG" alt="" /></p>
<p>Now maybe that doesn&#8217;t really impress you much, as you probably <em>just </em>see a postit on my desktop.<br />
(Postits come with Win7, btw).<br />
But check this out - The netbook was laying next to the bed in sleep mode.<br />
It took less than 15 seconds for me to open the lid, log in to the operating system, type my note and close the lid.<br />
For brainstorming on the fly&#8230;thats amazing! The netbook becomes more than a pc&#8230;its more like..ummm&#8230;a notebook. The paper kind even.</p>
<p>So there you have it. Simple post about a simple thing. But for me..its monumental for where I hoped personal technology would be. </p>
<p>And in other news:<br />
I spotted some Microsoft MCTS training books on the bookshelf of Sheldon and Leonards apartment (Big Bang Theory television show):</p>
<p><img src="http://www.danielwoolston.com/wp-content/images/msftBooks.JPG" alt="" /></p>
<p>You have to be both a programming nerd and a fan of this show to really appreciate the find.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielwoolston.com/?feed=rss2&amp;p=28</wfw:commentRss>
		</item>
		<item>
		<title>funny (old) hockey commercial</title>
		<link>http://www.danielwoolston.com/?p=16</link>
		<comments>http://www.danielwoolston.com/?p=16#comments</comments>
		<pubDate>Wed, 10 Sep 2008 14:04:14 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.danielwoolston.com/?p=16</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/KFiN9C4t3rc&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/KFiN9C4t3rc&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielwoolston.com/?feed=rss2&amp;p=16</wfw:commentRss>
		</item>
	</channel>
</rss>
