<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mike Cousins</title>
	<atom:link href="http://www.mikecousins.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikecousins.com</link>
	<description>Web, mobile, cloud. It&#039;s all the rage.</description>
	<lastBuildDate>Fri, 27 Jan 2012 17:22:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Office 365 ActiveSync fail, again</title>
		<link>http://www.mikecousins.com/office-365-activesync-fail-again/</link>
		<comments>http://www.mikecousins.com/office-365-activesync-fail-again/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 02:04:59 +0000</pubDate>
		<dc:creator>Mike Cousins</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[office365]]></category>

		<guid isPermaLink="false">http://www.mikecousins.com/?p=527</guid>
		<description><![CDATA[When Office 365 launched the mobile server address was m.outlook.com. This was a great address: easy to remember, pretty short, etc. A couple months ago my phone stopped syncing my mail. I went to the Office 365 forums and found that for some reason m.outlook.com was now broken and everybody had to switch to an address found by going into Options -> See All Options -> Settings for POP, IMAP, and SMTP access&#8230; Mine was pod51009.outlook.com. Then last night it went down again. I checked...]]></description>
			<content:encoded><![CDATA[<p>When Office 365 launched the mobile server address was m.outlook.com.  This was a great address: easy to remember, pretty short, etc.</p>
<p>A couple months ago my phone stopped syncing my mail.  I went to the Office 365 forums and found that for some reason m.outlook.com was now broken and everybody had to switch to an address found by going into Options -> See All Options -> Settings for POP, IMAP, and SMTP access&#8230; Mine was pod51009.outlook.com.</p>
<p>Then last night it went down again.  I checked online and sure enough the address has now changed again.  This time you have to use the hostname found in Help->About.  Mine is ch1prd0402.outlook.com.</p>
<p>This is completely unacceptable as a paying customer.  If you know that you are messing around with DNS or something that will change what server address your customers use, you should send out a heads up email and get people to switch over early.  At the very least just a heads up email that it&#8217;s broken and here is how to fix it.  Letting the community find out how to fix it after Microsoft breaks it is getting old fast.</p>
<p><strong>Update &#8211; January 25, 2012</strong><br />
Now that I&#8217;m using the actual hostname it can change at anytime.  I figured this probably wouldn&#8217;t change that often but I was wrong.  It changed for me after 2 weeks.  This is getting old pretty fast.  Microsoft also seems to be either completely ignoring the issue or saying that it&#8217;s affecting a small number of customers.  I fail to see how every person who uses Android is a small number considering they now have the largest market share in smartphones.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikecousins.com/office-365-activesync-fail-again/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Silverlight 5 + Internet Explorer 9 using old Content-Type from POST in a subsequent GET</title>
		<link>http://www.mikecousins.com/silverlight-5-internet-explorer-9-using-old-contenttype-from-post-in-a-subsequent-get/</link>
		<comments>http://www.mikecousins.com/silverlight-5-internet-explorer-9-using-old-contenttype-from-post-in-a-subsequent-get/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 22:56:39 +0000</pubDate>
		<dc:creator>Mike Cousins</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://www.mikecousins.com/?p=528</guid>
		<description><![CDATA[We&#8217;ve been running into a super annoying problem at work. After our Silverlight application makes it&#8217;s login POST the next GET that we send fails with a NotFoundException. This only happens when using the Silverlight 5 runtime and only happens in Internet Explorer 9. I have tested now with Silverlight 4 as well as Chrome, Firefox, Opera and Safari, and IE9/SL5 is the only bad combination. Here are the headers of our login POST: POST /login HTTP/1.1 Accept: application/xml Referer: http://localhost:8080/censored.xap?timestamp=1326148328000 Accept-Language: en-CA Content-Length: 38...]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been running into a super annoying problem at work.  After our Silverlight application makes it&#8217;s login POST the next GET that we send fails with a NotFoundException.  This only happens when using the Silverlight 5 runtime and only happens in Internet Explorer 9.  I have tested now with Silverlight 4 as well as Chrome, Firefox, Opera and Safari, and IE9/SL5 is the only bad combination.</p>
<p>Here are the headers of our login POST:</p>
<p><code>POST /login HTTP/1.1<br />
Accept: application/xml<br />
Referer: http://localhost:8080/censored.xap?timestamp=1326148328000<br />
Accept-Language: en-CA<br />
Content-Length: 38<br />
Content-Type: application/x-www-form-urlencoded<br />
Accept-Encoding: gzip, deflate<br />
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)<br />
Host: localhost:8080<br />
Connection: Keep-Alive<br />
Pragma: no-cache<br />
Cookie: JSESSIONID=DEFEAFD35E9B067A79F772C166937750<br />
</code></p>
<p>Here are the headers of our next GET:</p>
<p><code>GET /user/current HTTP/1.1<br />
Accept: application/xml<br />
Referer: http://localhost:8080/censored.xap?timestamp=1326148328000<br />
Accept-Language: en-CA<br />
Content-Length: 38<br />
Content-Type: application/x-www-form-urlencoded<br />
Accept-Encoding: gzip, deflate<br />
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)<br />
Host: localhost:8080<br />
Proxy-Connection: Keep-Alive<br />
Pragma: no-cache<br />
Cookie: JSESSIONID=5C57C93458E80E5975470F703B4A483C<br />
</code></p>
<p>Notice that the Content-Type and Content-Length are identical, even though:</p>
<ul>
<li>You aren&#8217;t allowed to use Content-Type or Content-Length on a GET</li>
<li>The content length is actually different in the GET request so it&#8217;s obviously the old value</li>
</ul>
<p>Here is a <a href="http://www.mikecousins.com/files/NetworkTest.zip">sample solution</a> that demonstrates the issue.</p>
<p>Silverlight client:</p>
<pre class="brush: csharp; title: ; notranslate">
using System.IO;
using System.Net;
using System.Net.Browser;
using System.Windows.Controls;

namespace NetworkTest
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            HttpWebRequest request = (HttpWebRequest)WebRequestCreator.BrowserHttp.Create(new Uri(&quot;http://localhost:59050/Home/Login&quot;));
            request.Method = &quot;POST&quot;;
            request.ContentType = &quot;application/x-www-form-urlencoded&quot;;
            request.BeginGetRequestStream(result =&gt;
                {
                    var rq = result.AsyncState as HttpWebRequest;

                    using (var stream = rq.EndGetRequestStream(result))
                    {
                        StreamWriter writer = new StreamWriter(stream);
                        writer.WriteLine(&quot;username=test&amp;password=test&quot;);
                        writer.Flush();
                        writer.Close();
                    }

                    rq.BeginGetResponse(
                        r =&gt;
                        {
                            try
                            {
                                rq.EndGetResponse(r);
                            }
                            catch
                            {
                            }
                        }, rq);
                }, request);
        }
    }
}
</pre>
<p>Server code:</p>
<pre class="brush: csharp; title: ; notranslate">
using System.Web.Mvc;

namespace TestServer.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Login(string test)
        {
            return RedirectToAction(&quot;Index&quot;);
        }
    }
}
</pre>
<p>Basically the Silverlight client makes a POST to the login page which redirects back to the index page.  The index page GET still contains the Content-Type and Content-Length fields from the login POST and so it fails.  This works just fine in Chrome.  It also only happens with BrowserHttp.  ClientHttp works fine but isn&#8217;t an option at work because we&#8217;re using cookie authentication and so we need the browser to make the requests.</p>
<p>Anyone else running into this?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikecousins.com/silverlight-5-internet-explorer-9-using-old-contenttype-from-post-in-a-subsequent-get/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Canadian investing made lazy</title>
		<link>http://www.mikecousins.com/canadian-investing-made-lazy/</link>
		<comments>http://www.mikecousins.com/canadian-investing-made-lazy/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 20:49:38 +0000</pubDate>
		<dc:creator>Mike Cousins</dc:creator>
				<category><![CDATA[Money]]></category>
		<category><![CDATA[canada]]></category>
		<category><![CDATA[etf]]></category>
		<category><![CDATA[investing]]></category>
		<category><![CDATA[money]]></category>

		<guid isPermaLink="false">http://www.mikecousins.com/?p=514</guid>
		<description><![CDATA[It&#8217;s Easy One of the most common complaints that I hear about investing is that it&#8217;s too complicated and that people don&#8217;t have time to learn about how to do it. The good thing is, it pays to be lazy in investing! Canadian Capitalist &#8211; Lazy Man&#8217;s Portfolio Almost every stock or mutual fund will lose to it&#8217;s respective index. The concept of the &#8220;lazy&#8221; portfolio is just to buy something as similar to the index as possible. This way you will go up and...]]></description>
			<content:encoded><![CDATA[<p><strong>It&#8217;s Easy</strong><br />
One of the most common complaints that I hear about investing is that it&#8217;s too complicated and that people don&#8217;t have time to learn about how to do it.  The good thing is, it pays to be lazy in investing!</p>
<p><a href="http://www.canadiancapitalist.com/the-lazy-mans-portfolio/" title="Canadian Capitalist - Lazy Man's Portfolio" target="_blank">Canadian Capitalist &#8211; Lazy Man&#8217;s Portfolio</a></p>
<p>Almost every stock or mutual fund will lose to it&#8217;s respective index.  The concept of the &#8220;lazy&#8221; portfolio is just to buy something as similar to the index as possible.  This way you will go up and down with the market and over long periods of time you should go up.  Choosing individual stocks, researching companies, etc., usually ends up in your playing &#8220;the loser&#8217;s game&#8221;.  Never trade or sell your stocks, only add to the portfolio to keep your percentages as close to the desired percentage as possible.</p>
<p><a href="http://articles.businessinsider.com/2011-12-24/news/30553804_1_investment-game-financial-media-grand-masters" target="_blank">Don&#8217;t Play The Loser&#8217;s Game</a></p>
<p><strong>Mutual Funds vs ETFs</strong></p>
<p>ETFs have become very popular lately and for good reason, they will always perform better than their respective mutual fund because they have less management fees.  Because we&#8217;re going with index funds the only differentiator left is the amount of management fees (denoted MER, management expense ratio) that they charge.  ETFs are usually much lower, usually in the 0.1-0.3% range rather than 0.5-3% range.  They&#8217;re usually an order of magnitude better.  This will mean several tens or hundreds of thousands of dollars difference by the time you retire.</p>
<p><strong>Choosing Your Portfolio</strong></p>
<p>There are a bunch of good model portfolios floating around the web.  Here are two of my favourites:</p>
<p><a href="http://www.canadiancapitalist.com/tidying-up-the-sleepy-portfolio/" target="_blank">Canadian Capitalist</a></p>
<p><a href="http://www.efficientmarket.ca/article/Global_ETF_2" target="_blank">Efficient Market</a></p>
<p>I took their recommendations and customized it a bit and here&#8217;s what I&#8217;ve decided to go with for mine:</p>
<ul>
<li>XIC &#8211; 25% &#8211; Canadian Equity &#8211; 0.25% MER</li>
<li>VTI &#8211; 20% &#8211; US Equity &#8211; 0.07% MER</li>
<li>VEA &#8211; 20% &#8211; Europe/Asia Equity &#8211; 0.12% MER</li>
<li>VWO &#8211; 5% &#8211; Emerging Equity &#8211; 0.22% MER</li>
<li>XBB &#8211; 25% &#8211; Canadian Bonds &#8211; 0.30% MER</li>
<li>RBF2010 &#8211; 5% &#8211; Canadian Cash</li>
</ul>
<p>That&#8217;s a blended MER of 0.19%!  Compare that to your average mutual fund based index portfolio which would have a blended MER closer to 1%.</p>
<p>RBF2010 is a mutual fund which is basically a high interest savings account under the covers.  Great for holding in an RRSP/TFSA.  It currently pays out at 1.25%.  I also hold XBB instead of XSB/XRB for simplicity.</p>
<p><strong>Getting Started</strong></p>
<p>To do this yourself you&#8217;ll want to get a self-directed investment account from your bank of choice:</p>
<p><a href="http://www.rbcdirectinvesting.com/" target="_blank">Royal Bank Direct Investing</a><br />
<a href="http://www.tdwaterhouse.ca/products-services/investing/discount-brokerage/index.jsp" target="_blank">TD Waterhouse Discount Brokerage</a><br />
<a href="https://www.investorsedge.cibc.com/ie/index.html" target="_blank">CIBC Investor&#8217;s Edge</a><br />
etc.</p>
<p>There is also Credential Direct which is an independent Canadian brokerage:<br />
<a href="http://www.credentialdirect.com/" target="_blank">Credential Direct</a></p>
<p>Setup an RRSP and TFSA with whichever one you want and get lazy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikecousins.com/canadian-investing-made-lazy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Localizing a Silverlight DatePicker control, a study in pain thresholds</title>
		<link>http://www.mikecousins.com/localizing-a-silverlight-datepicker-control-a-study-in-pain-thresholds/</link>
		<comments>http://www.mikecousins.com/localizing-a-silverlight-datepicker-control-a-study-in-pain-thresholds/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 17:34:07 +0000</pubDate>
		<dc:creator>Mike Cousins</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://blog.mikecousins.com/?p=491</guid>
		<description><![CDATA[For shame Microsoft. There is currently no way to localize a DatePicker. Instead of letting us simply specify a format string or any of the other beautiful conventions we are forced to basically re-template the entire control. In our application, at my day job, we support many different languages/cultures. This was becoming a mess with the various date formats so we decreed that all dates would be in the ISO standard format (yyyy-MM-dd HH:mm:ss). Styling everything in the app was a 10 minute job, until...]]></description>
			<content:encoded><![CDATA[<p>For shame Microsoft.  There is currently no way to localize a DatePicker.  Instead of letting us simply specify a format string or any of the other beautiful conventions we are forced to basically re-template the entire control.</p>
<p>In our application, at my day job, we support many different languages/cultures.  This was becoming a mess with the various date formats so we decreed that all dates would be in the ISO standard format (yyyy-MM-dd HH:mm:ss).  Styling everything in the app was a 10 minute job, until I got to the DatePickers that we use for our search fields.  I couldn&#8217;t find a nice FormatString to set in XAML.  I couldn&#8217;t find a way to set anything else in the code behind either.  I changed how we display the selected date by reformatting the text string that the Text property is bound to. That was fixed, but now I was left with a watermark stating <code></code> when the actual format was <code>yyyy-mm-dd</code> I resorted to Google.</p>
<p>I found a lot of rants and only a couple possible solutions.</p>
<p>http://blogs.msdn.com/b/silverlight_sdk/archive/2010/05/06/changing-the-watermark-text-in-a-datepicker-control.aspx</p>
<p>This blog shows a way to change the watermark, but the solution quickly fails after selecting a date and then deleting it.  It will revert back to the original watermark.  Unacceptable.</p>
<p>One of the last comments says that this code will fix it:</p>
<pre class="brush: csharp; title: ; notranslate">
public class CustomDatePicker : DatePicker
{
   public CustomDatePicker()
   {
       SelectedDateChanged += DateChanged;
       Unloaded += CustomDatePickerUnloaded;
   }

   public override void OnApplyTemplate()
   {
       base.OnApplyTemplate();
       HandleWatermark();
   }

   private void DateChanged(object sender, SelectionChangedEventArgs e)
   {
       HandleWatermark();
   }

   private void CustomDatePickerUnloaded(object sender, RoutedEventArgs e)
   {
       SelectedDateChanged -= DateChanged;
   }

   public void HandleWatermark()
   {
       var box = GetTemplateChild(&quot;TextBox&quot;) as DatePickerTextBox;

       if (box == null) return;

       if (SelectedDateFormat == DatePickerFormat.Short)
           box.Watermark = &quot;mm/dd/yyyy&quot;;
   }
}
</pre>
<p>This code is closer, but there is still a bug.  From the time that you delete the date until the time that you unfocus the DatePicker the original watermark is displayed.  So close, but so far.</p>
<p>I eventually found this solution, which seems like entirely too much work for such a simple problem.  You basically have to style the DatePicker and the DatePickerTextBox that it contains.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;Style x:Key=&quot;IsoDatePickerTextBoxStyle&quot; TargetType=&quot;System_Windows_Controls_Primitives:DatePickerTextBox&quot;&gt;
    &lt;Setter Property=&quot;VerticalContentAlignment&quot; Value=&quot;Center&quot;/&gt;
    &lt;Setter Property=&quot;HorizontalContentAlignment&quot; Value=&quot;Left&quot;/&gt;
    &lt;Setter Property=&quot;Template&quot;&gt;
        &lt;Setter.Value&gt;
            &lt;ControlTemplate TargetType=&quot;System_Windows_Controls_Primitives:DatePickerTextBox&quot;&gt;
                &lt;Grid x:Name=&quot;Root&quot;&gt;
                    &lt;Grid.Resources&gt;
                        &lt;SolidColorBrush x:Key=&quot;WatermarkBrush&quot; Color=&quot;#FFAAAAAA&quot;/&gt;
                    &lt;/Grid.Resources&gt;
                    &lt;VisualStateManager.VisualStateGroups&gt;
                        &lt;VisualStateGroup x:Name=&quot;CommonStates&quot;&gt;
                            &lt;VisualStateGroup.Transitions&gt;
                                &lt;VisualTransition GeneratedDuration=&quot;0&quot;/&gt;
                                &lt;VisualTransition GeneratedDuration=&quot;0:0:0.1&quot; To=&quot;MouseOver&quot;/&gt;
                            &lt;/VisualStateGroup.Transitions&gt;
                            &lt;VisualState x:Name=&quot;Normal&quot;/&gt;
                            &lt;VisualState x:Name=&quot;MouseOver&quot;&gt;
                                &lt;Storyboard&gt;
                                    &lt;ColorAnimationUsingKeyFrames Storyboard.TargetProperty=&quot;(Border.BorderBrush).(SolidColorBrush.Color)&quot; Storyboard.TargetName=&quot;ContentElement&quot;&gt;
                                        &lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#FF99C1E2&quot;/&gt;
                                    &lt;/ColorAnimationUsingKeyFrames&gt;
                                    &lt;ColorAnimationUsingKeyFrames Storyboard.TargetProperty=&quot;(Border.BorderBrush).(SolidColorBrush.Color)&quot; Storyboard.TargetName=&quot;ContentElement2&quot;&gt;
                                        &lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#FF99C1E2&quot;/&gt;
                                    &lt;/ColorAnimationUsingKeyFrames&gt;
                                &lt;/Storyboard&gt;
                            &lt;/VisualState&gt;
                        &lt;/VisualStateGroup&gt;
                        &lt;VisualStateGroup x:Name=&quot;WatermarkStates&quot;&gt;
                            &lt;VisualStateGroup.Transitions&gt;
                                &lt;VisualTransition GeneratedDuration=&quot;0&quot;/&gt;
                            &lt;/VisualStateGroup.Transitions&gt;
                            &lt;VisualState x:Name=&quot;Unwatermarked&quot;/&gt;
                            &lt;VisualState x:Name=&quot;Watermarked&quot;&gt;
                                &lt;Storyboard&gt;
                                    &lt;DoubleAnimation Duration=&quot;0&quot; To=&quot;0&quot; Storyboard.TargetProperty=&quot;Opacity&quot; Storyboard.TargetName=&quot;ContentElement&quot;/&gt;
                                    &lt;DoubleAnimation Duration=&quot;0&quot; To=&quot;1&quot; Storyboard.TargetProperty=&quot;Opacity&quot; Storyboard.TargetName=&quot;Watermark&quot;/&gt;
                                &lt;/Storyboard&gt;
                            &lt;/VisualState&gt;
                        &lt;/VisualStateGroup&gt;
                        &lt;VisualStateGroup x:Name=&quot;FocusStates&quot;&gt;
                            &lt;VisualStateGroup.Transitions&gt;
                                &lt;VisualTransition GeneratedDuration=&quot;0&quot;/&gt;
                            &lt;/VisualStateGroup.Transitions&gt;
                            &lt;VisualState x:Name=&quot;Unfocused&quot;/&gt;
                            &lt;VisualState x:Name=&quot;Focused&quot;&gt;
                                &lt;Storyboard&gt;
                                    &lt;DoubleAnimation Duration=&quot;0&quot; To=&quot;1&quot; Storyboard.TargetProperty=&quot;Opacity&quot; Storyboard.TargetName=&quot;FocusVisual&quot;/&gt;
                                &lt;/Storyboard&gt;
                            &lt;/VisualState&gt;
                        &lt;/VisualStateGroup&gt;
                    &lt;/VisualStateManager.VisualStateGroups&gt;
                    &lt;Border x:Name=&quot;Border&quot; BorderBrush=&quot;{TemplateBinding BorderBrush}&quot; BorderThickness=&quot;{TemplateBinding BorderThickness}&quot; CornerRadius=&quot;1&quot; Opacity=&quot;1&quot;&gt;
                        &lt;Grid x:Name=&quot;WatermarkContent&quot; Background=&quot;{TemplateBinding Background}&quot;&gt;
                            &lt;Border x:Name=&quot;ContentElement&quot; BorderBrush=&quot;#FFFFFFFF&quot; BorderThickness=&quot;1&quot; Background=&quot;{TemplateBinding Background}&quot; Padding=&quot;{TemplateBinding Padding}&quot;/&gt;
                            &lt;Border x:Name=&quot;ContentElement2&quot; BorderBrush=&quot;#FFFFFFFF&quot; BorderThickness=&quot;1&quot;&gt;
                                &lt;ContentControl x:Name=&quot;Watermark&quot; Background=&quot;{TemplateBinding Background}&quot; Content=&quot;{Binding ApplicationStrings.WatermarkDateFormat, Source={StaticResource ResourceWrapper}}&quot; Foreground=&quot;{StaticResource WatermarkBrush}&quot; FontSize=&quot;{TemplateBinding FontSize}&quot; HorizontalAlignment=&quot;{TemplateBinding HorizontalContentAlignment}&quot; HorizontalContentAlignment=&quot;{TemplateBinding HorizontalContentAlignment}&quot; IsHitTestVisible=&quot;False&quot; IsTabStop=&quot;False&quot; Opacity=&quot;0&quot; Padding=&quot;2&quot; VerticalAlignment=&quot;{TemplateBinding VerticalContentAlignment}&quot; VerticalContentAlignment=&quot;{TemplateBinding VerticalContentAlignment}&quot;/&gt;
                            &lt;/Border&gt;
                            &lt;Border x:Name=&quot;FocusVisual&quot; BorderBrush=&quot;#FF6DBDD1&quot; BorderThickness=&quot;{TemplateBinding BorderThickness}&quot; CornerRadius=&quot;1&quot; IsHitTestVisible=&quot;False&quot; Opacity=&quot;0&quot;/&gt;
                        &lt;/Grid&gt;
                    &lt;/Border&gt;
                &lt;/Grid&gt;
            &lt;/ControlTemplate&gt;
        &lt;/Setter.Value&gt;
    &lt;/Setter&gt;
&lt;/Style&gt;
&lt;Style x:Key=&quot;IsoDatePickerStyle&quot; TargetType=&quot;controls:DatePicker&quot;&gt;
    &lt;Setter Property=&quot;IsTabStop&quot; Value=&quot;False&quot;/&gt;
    &lt;Setter Property=&quot;Background&quot; Value=&quot;#FFFFFFFF&quot;/&gt;
    &lt;Setter Property=&quot;Padding&quot; Value=&quot;2&quot;/&gt;
    &lt;Setter Property=&quot;SelectionBackground&quot; Value=&quot;#FF444444&quot;/&gt;
    &lt;Setter Property=&quot;BorderBrush&quot;&gt;
        &lt;Setter.Value&gt;
            &lt;LinearGradientBrush EndPoint=&quot;.5,0&quot; StartPoint=&quot;.5,1&quot;&gt;
                &lt;GradientStop Color=&quot;#FF617584&quot; Offset=&quot;0&quot;/&gt;
                &lt;GradientStop Color=&quot;#FF718597&quot; Offset=&quot;0.375&quot;/&gt;
                &lt;GradientStop Color=&quot;#FF8399A9&quot; Offset=&quot;0.375&quot;/&gt;
                &lt;GradientStop Color=&quot;#FFA3AEB9&quot; Offset=&quot;1&quot;/&gt;
            &lt;/LinearGradientBrush&gt;
        &lt;/Setter.Value&gt;
    &lt;/Setter&gt;
    &lt;Setter Property=&quot;BorderThickness&quot; Value=&quot;1&quot;/&gt;
    &lt;Setter Property=&quot;Template&quot;&gt;
        &lt;Setter.Value&gt;
            &lt;ControlTemplate TargetType=&quot;controls:DatePicker&quot;&gt;
                &lt;Grid x:Name=&quot;Root&quot;&gt;
                    &lt;Grid.Resources&gt;
                        &lt;SolidColorBrush x:Key=&quot;DisabledBrush&quot; Color=&quot;#8CFFFFFF&quot;/&gt;
                        &lt;ControlTemplate x:Key=&quot;DropDownButtonTemplate&quot; TargetType=&quot;Button&quot;&gt;
                            &lt;Grid FlowDirection=&quot;LeftToRight&quot;&gt;
                                &lt;VisualStateManager.VisualStateGroups&gt;
                                    &lt;VisualStateGroup x:Name=&quot;CommonStates&quot;&gt;
                                        &lt;VisualStateGroup.Transitions&gt;
                                            &lt;VisualTransition GeneratedDuration=&quot;0&quot;/&gt;
                                            &lt;VisualTransition GeneratedDuration=&quot;0:0:0.1&quot; To=&quot;MouseOver&quot;/&gt;
                                            &lt;VisualTransition GeneratedDuration=&quot;0:0:0.1&quot; To=&quot;Pressed&quot;/&gt;
                                        &lt;/VisualStateGroup.Transitions&gt;
                                        &lt;VisualState x:Name=&quot;Normal&quot;/&gt;
                                        &lt;VisualState x:Name=&quot;MouseOver&quot;&gt;
                                            &lt;Storyboard&gt;
                                                &lt;ColorAnimation Duration=&quot;0&quot; To=&quot;#FF448DCA&quot; Storyboard.TargetProperty=&quot;(Border.Background).(SolidColorBrush.Color)&quot; Storyboard.TargetName=&quot;Background&quot;/&gt;
                                                &lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;00:00:00.001&quot; Storyboard.TargetProperty=&quot;(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)&quot; Storyboard.TargetName=&quot;BackgroundGradient&quot;&gt;
                                                    &lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#7FFFFFFF&quot;/&gt;
                                                &lt;/ColorAnimationUsingKeyFrames&gt;
                                                &lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;00:00:00.001&quot; Storyboard.TargetProperty=&quot;(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)&quot; Storyboard.TargetName=&quot;BackgroundGradient&quot;&gt;
                                                    &lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#CCFFFFFF&quot;/&gt;
                                                &lt;/ColorAnimationUsingKeyFrames&gt;
                                                &lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;00:00:00.001&quot; Storyboard.TargetProperty=&quot;(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)&quot; Storyboard.TargetName=&quot;BackgroundGradient&quot;&gt;
                                                    &lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#F2FFFFFF&quot;/&gt;
                                                &lt;/ColorAnimationUsingKeyFrames&gt;
                                            &lt;/Storyboard&gt;
                                        &lt;/VisualState&gt;
                                        &lt;VisualState x:Name=&quot;Pressed&quot;&gt;
                                            &lt;Storyboard&gt;
                                                &lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;00:00:00.001&quot; Storyboard.TargetProperty=&quot;(Border.Background).(SolidColorBrush.Color)&quot; Storyboard.TargetName=&quot;Background&quot;&gt;
                                                    &lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#FF448DCA&quot;/&gt;
                                                &lt;/ColorAnimationUsingKeyFrames&gt;
                                                &lt;DoubleAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;00:00:00.001&quot; Storyboard.TargetProperty=&quot;(UIElement.Opacity)&quot; Storyboard.TargetName=&quot;Highlight&quot;&gt;
                                                    &lt;SplineDoubleKeyFrame KeyTime=&quot;0&quot; Value=&quot;1&quot;/&gt;
                                                &lt;/DoubleAnimationUsingKeyFrames&gt;
                                                &lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;00:00:00.001&quot; Storyboard.TargetProperty=&quot;(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)&quot; Storyboard.TargetName=&quot;BackgroundGradient&quot;&gt;
                                                    &lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#EAFFFFFF&quot;/&gt;
                                                &lt;/ColorAnimationUsingKeyFrames&gt;
                                                &lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;00:00:00.001&quot; Storyboard.TargetProperty=&quot;(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)&quot; Storyboard.TargetName=&quot;BackgroundGradient&quot;&gt;
                                                    &lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#C6FFFFFF&quot;/&gt;
                                                &lt;/ColorAnimationUsingKeyFrames&gt;
                                                &lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;00:00:00.001&quot; Storyboard.TargetProperty=&quot;(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)&quot; Storyboard.TargetName=&quot;BackgroundGradient&quot;&gt;
                                                    &lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#6BFFFFFF&quot;/&gt;
                                                &lt;/ColorAnimationUsingKeyFrames&gt;
                                                &lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;00:00:00.001&quot; Storyboard.TargetProperty=&quot;(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)&quot; Storyboard.TargetName=&quot;BackgroundGradient&quot;&gt;
                                                    &lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#F4FFFFFF&quot;/&gt;
                                                &lt;/ColorAnimationUsingKeyFrames&gt;
                                            &lt;/Storyboard&gt;
                                        &lt;/VisualState&gt;
                                        &lt;VisualState x:Name=&quot;Disabled&quot;&gt;
                                            &lt;Storyboard&gt;
                                                &lt;DoubleAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;00:00:00.001&quot; Storyboard.TargetProperty=&quot;(UIElement.Opacity)&quot; Storyboard.TargetName=&quot;DisabledVisual&quot;&gt;
                                                    &lt;SplineDoubleKeyFrame KeyTime=&quot;0&quot; Value=&quot;1&quot;/&gt;
                                                &lt;/DoubleAnimationUsingKeyFrames&gt;
                                            &lt;/Storyboard&gt;
                                        &lt;/VisualState&gt;
                                    &lt;/VisualStateGroup&gt;
                                &lt;/VisualStateManager.VisualStateGroups&gt;
                                &lt;Grid Background=&quot;#11FFFFFF&quot; HorizontalAlignment=&quot;Center&quot; Height=&quot;18&quot; Margin=&quot;0&quot; VerticalAlignment=&quot;Center&quot; Width=&quot;19&quot;&gt;
                                    &lt;Grid.ColumnDefinitions&gt;
                                        &lt;ColumnDefinition Width=&quot;20*&quot;/&gt;
                                        &lt;ColumnDefinition Width=&quot;20*&quot;/&gt;
                                        &lt;ColumnDefinition Width=&quot;20*&quot;/&gt;
                                        &lt;ColumnDefinition Width=&quot;20*&quot;/&gt;
                                    &lt;/Grid.ColumnDefinitions&gt;
                                    &lt;Grid.RowDefinitions&gt;
                                        &lt;RowDefinition Height=&quot;23*&quot;/&gt;
                                        &lt;RowDefinition Height=&quot;19*&quot;/&gt;
                                        &lt;RowDefinition Height=&quot;19*&quot;/&gt;
                                        &lt;RowDefinition Height=&quot;19*&quot;/&gt;
                                    &lt;/Grid.RowDefinitions&gt;
                                    &lt;Border x:Name=&quot;Highlight&quot; BorderBrush=&quot;#FF6DBDD1&quot; BorderThickness=&quot;1&quot; Grid.ColumnSpan=&quot;4&quot; CornerRadius=&quot;0,0,1,1&quot; Margin=&quot;-1&quot; Opacity=&quot;0&quot; Grid.Row=&quot;0&quot; Grid.RowSpan=&quot;4&quot;/&gt;
                                    &lt;Border x:Name=&quot;Background&quot; BorderBrush=&quot;#FFFFFFFF&quot; BorderThickness=&quot;1&quot; Background=&quot;#FF1F3B53&quot; Grid.ColumnSpan=&quot;4&quot; CornerRadius=&quot;.5&quot; Margin=&quot;0,-1,0,0&quot; Opacity=&quot;1&quot; Grid.Row=&quot;1&quot; Grid.RowSpan=&quot;3&quot;/&gt;
                                    &lt;Border x:Name=&quot;BackgroundGradient&quot; BorderBrush=&quot;#BF000000&quot; BorderThickness=&quot;1&quot; Grid.ColumnSpan=&quot;4&quot; CornerRadius=&quot;.5&quot; Margin=&quot;0,-1,0,0&quot; Opacity=&quot;1&quot; Grid.Row=&quot;1&quot; Grid.RowSpan=&quot;3&quot;&gt;
                                        &lt;Border.Background&gt;
                                            &lt;LinearGradientBrush EndPoint=&quot;.7,1&quot; StartPoint=&quot;.7,0&quot;&gt;
                                                &lt;GradientStop Color=&quot;#FFFFFFFF&quot; Offset=&quot;0&quot;/&gt;
                                                &lt;GradientStop Color=&quot;#F9FFFFFF&quot; Offset=&quot;0.375&quot;/&gt;
                                                &lt;GradientStop Color=&quot;#E5FFFFFF&quot; Offset=&quot;0.625&quot;/&gt;
                                                &lt;GradientStop Color=&quot;#C6FFFFFF&quot; Offset=&quot;1&quot;/&gt;
                                            &lt;/LinearGradientBrush&gt;
                                        &lt;/Border.Background&gt;
                                    &lt;/Border&gt;
                                    &lt;Rectangle Grid.ColumnSpan=&quot;4&quot; Grid.RowSpan=&quot;1&quot; StrokeThickness=&quot;1&quot;&gt;
                                        &lt;Rectangle.Fill&gt;
                                            &lt;LinearGradientBrush EndPoint=&quot;0.3,-1.1&quot; StartPoint=&quot;0.46,1.6&quot;&gt;
                                                &lt;GradientStop Color=&quot;#FF4084BD&quot;/&gt;
                                                &lt;GradientStop Color=&quot;#FFAFCFEA&quot; Offset=&quot;1&quot;/&gt;
                                            &lt;/LinearGradientBrush&gt;
                                        &lt;/Rectangle.Fill&gt;
                                        &lt;Rectangle.Stroke&gt;
                                            &lt;LinearGradientBrush EndPoint=&quot;0.48,-1&quot; StartPoint=&quot;0.48,1.25&quot;&gt;
                                                &lt;GradientStop Color=&quot;#FF494949&quot;/&gt;
                                                &lt;GradientStop Color=&quot;#FF9F9F9F&quot; Offset=&quot;1&quot;/&gt;
                                            &lt;/LinearGradientBrush&gt;
                                        &lt;/Rectangle.Stroke&gt;
                                    &lt;/Rectangle&gt;
                                    &lt;Path Grid.ColumnSpan=&quot;4&quot; Grid.Column=&quot;0&quot; Data=&quot;M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z&quot; Fill=&quot;#FF2F2F2F&quot; HorizontalAlignment=&quot;Center&quot; Margin=&quot;4,3,4,3&quot; Grid.Row=&quot;1&quot; Grid.RowSpan=&quot;3&quot; RenderTransformOrigin=&quot;0.5,0.5&quot; Stretch=&quot;Fill&quot; VerticalAlignment=&quot;Center&quot;/&gt;
                                    &lt;Ellipse Grid.ColumnSpan=&quot;4&quot; Fill=&quot;#FFFFFFFF&quot; HorizontalAlignment=&quot;Center&quot; Height=&quot;3&quot; StrokeThickness=&quot;0&quot; VerticalAlignment=&quot;Center&quot; Width=&quot;3&quot;/&gt;
                                    &lt;Border x:Name=&quot;DisabledVisual&quot; BorderBrush=&quot;#B2FFFFFF&quot; BorderThickness=&quot;1&quot; Grid.ColumnSpan=&quot;4&quot; CornerRadius=&quot;0,0,.5,.5&quot; Opacity=&quot;0&quot; Grid.Row=&quot;0&quot; Grid.RowSpan=&quot;4&quot;/&gt;
                                &lt;/Grid&gt;
                            &lt;/Grid&gt;
                        &lt;/ControlTemplate&gt;
                    &lt;/Grid.Resources&gt;
                    &lt;Grid.ColumnDefinitions&gt;
                        &lt;ColumnDefinition Width=&quot;*&quot;/&gt;
                        &lt;ColumnDefinition Width=&quot;Auto&quot;/&gt;
                    &lt;/Grid.ColumnDefinitions&gt;
                    &lt;VisualStateManager.VisualStateGroups&gt;
                        &lt;VisualStateGroup x:Name=&quot;CommonStates&quot;&gt;
                            &lt;VisualState x:Name=&quot;Normal&quot;/&gt;
                            &lt;VisualState x:Name=&quot;Disabled&quot;&gt;
                                &lt;Storyboard&gt;
                                    &lt;DoubleAnimation Duration=&quot;0&quot; To=&quot;1&quot; Storyboard.TargetProperty=&quot;Opacity&quot; Storyboard.TargetName=&quot;DisabledVisual&quot;/&gt;
                                &lt;/Storyboard&gt;
                            &lt;/VisualState&gt;
                        &lt;/VisualStateGroup&gt;
                        &lt;VisualStateGroup x:Name=&quot;ValidationStates&quot;&gt;
                            &lt;VisualState x:Name=&quot;Valid&quot;/&gt;
                            &lt;VisualState x:Name=&quot;InvalidUnfocused&quot;&gt;
                                &lt;Storyboard&gt;
                                    &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=&quot;Visibility&quot; Storyboard.TargetName=&quot;ValidationErrorElement&quot;&gt;
                                        &lt;DiscreteObjectKeyFrame KeyTime=&quot;0&quot;&gt;
                                            &lt;DiscreteObjectKeyFrame.Value&gt;
                                                &lt;Visibility&gt;Visible&lt;/Visibility&gt;
                                            &lt;/DiscreteObjectKeyFrame.Value&gt;
                                        &lt;/DiscreteObjectKeyFrame&gt;
                                    &lt;/ObjectAnimationUsingKeyFrames&gt;
                                &lt;/Storyboard&gt;
                            &lt;/VisualState&gt;
                            &lt;VisualState x:Name=&quot;InvalidFocused&quot;&gt;
                                &lt;Storyboard&gt;
                                    &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=&quot;Visibility&quot; Storyboard.TargetName=&quot;ValidationErrorElement&quot;&gt;
                                        &lt;DiscreteObjectKeyFrame KeyTime=&quot;0&quot;&gt;
                                            &lt;DiscreteObjectKeyFrame.Value&gt;
                                                &lt;Visibility&gt;Visible&lt;/Visibility&gt;
                                            &lt;/DiscreteObjectKeyFrame.Value&gt;
                                        &lt;/DiscreteObjectKeyFrame&gt;
                                    &lt;/ObjectAnimationUsingKeyFrames&gt;
                                    &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=&quot;IsOpen&quot; Storyboard.TargetName=&quot;validationTooltip&quot;&gt;
                                        &lt;DiscreteObjectKeyFrame KeyTime=&quot;0&quot;&gt;
                                            &lt;DiscreteObjectKeyFrame.Value&gt;
                                                &lt;System:Boolean&gt;True&lt;/System:Boolean&gt;
                                            &lt;/DiscreteObjectKeyFrame.Value&gt;
                                        &lt;/DiscreteObjectKeyFrame&gt;
                                    &lt;/ObjectAnimationUsingKeyFrames&gt;
                                &lt;/Storyboard&gt;
                            &lt;/VisualState&gt;
                        &lt;/VisualStateGroup&gt;
                    &lt;/VisualStateManager.VisualStateGroups&gt;
                    &lt;System_Windows_Controls_Primitives:DatePickerTextBox Background=&quot;White&quot; x:Name=&quot;TextBox&quot; BorderBrush=&quot;{TemplateBinding BorderBrush}&quot; BorderThickness=&quot;{TemplateBinding BorderThickness}&quot; Grid.Column=&quot;0&quot; Padding=&quot;{TemplateBinding Padding}&quot; SelectionBackground=&quot;{TemplateBinding SelectionBackground}&quot; Style=&quot;{StaticResource IsoDatePickerTextBoxStyle}&quot;/&gt;
                    &lt;Border x:Name=&quot;ValidationErrorElement&quot; BorderBrush=&quot;#FFDB000C&quot; BorderThickness=&quot;1&quot; Grid.Column=&quot;0&quot; CornerRadius=&quot;1&quot; Visibility=&quot;Collapsed&quot;&gt;
                        &lt;ToolTipService.ToolTip&gt;
                            &lt;ToolTip x:Name=&quot;validationTooltip&quot; DataContext=&quot;{Binding RelativeSource={RelativeSource TemplatedParent}}&quot; Placement=&quot;Right&quot; PlacementTarget=&quot;{Binding ElementName=TextBox}&quot; Template=&quot;{StaticResource CommonValidationToolTipTemplate}&quot;&gt;
                                &lt;ToolTip.Triggers&gt;
                                    &lt;EventTrigger RoutedEvent=&quot;Canvas.Loaded&quot;&gt;
                                        &lt;BeginStoryboard&gt;
                                            &lt;Storyboard&gt;
                                                &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=&quot;IsHitTestVisible&quot; Storyboard.TargetName=&quot;validationTooltip&quot;&gt;
                                                    &lt;DiscreteObjectKeyFrame KeyTime=&quot;0&quot;&gt;
                                                        &lt;DiscreteObjectKeyFrame.Value&gt;
                                                            &lt;System:Boolean&gt;true&lt;/System:Boolean&gt;
                                                        &lt;/DiscreteObjectKeyFrame.Value&gt;
                                                    &lt;/DiscreteObjectKeyFrame&gt;
                                                &lt;/ObjectAnimationUsingKeyFrames&gt;
                                            &lt;/Storyboard&gt;
                                        &lt;/BeginStoryboard&gt;
                                    &lt;/EventTrigger&gt;
                                &lt;/ToolTip.Triggers&gt;
                            &lt;/ToolTip&gt;
                        &lt;/ToolTipService.ToolTip&gt;
                        &lt;Grid Background=&quot;Transparent&quot; HorizontalAlignment=&quot;Right&quot; Height=&quot;12&quot; Margin=&quot;1,-4,-4,0&quot; VerticalAlignment=&quot;Top&quot; Width=&quot;12&quot;&gt;
                            &lt;Path Data=&quot;M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z&quot; Fill=&quot;#FFDC000C&quot; Margin=&quot;1,3,0,0&quot;/&gt;
                            &lt;Path Data=&quot;M 0,0 L2,0 L 8,6 L8,8&quot; Fill=&quot;#FFFFFF&quot; Margin=&quot;1,3,0,0&quot;/&gt;
                        &lt;/Grid&gt;
                    &lt;/Border&gt;
                    &lt;Button x:Name=&quot;Button&quot; BorderBrush=&quot;{TemplateBinding BorderBrush}&quot; BorderThickness=&quot;{TemplateBinding BorderThickness}&quot; Grid.Column=&quot;1&quot; Foreground=&quot;{TemplateBinding Foreground}&quot; Margin=&quot;2,0,2,0&quot; Template=&quot;{StaticResource DropDownButtonTemplate}&quot; Width=&quot;20&quot;/&gt;
                    &lt;Grid x:Name=&quot;DisabledVisual&quot; Grid.ColumnSpan=&quot;2&quot; IsHitTestVisible=&quot;False&quot; Opacity=&quot;0&quot;&gt;
                        &lt;Grid.ColumnDefinitions&gt;
                            &lt;ColumnDefinition Width=&quot;*&quot;/&gt;
                            &lt;ColumnDefinition Width=&quot;Auto&quot;/&gt;
                        &lt;/Grid.ColumnDefinitions&gt;
                        &lt;Rectangle Fill=&quot;#8CFFFFFF&quot; RadiusY=&quot;1&quot; RadiusX=&quot;1&quot;/&gt;
                        &lt;Rectangle Grid.Column=&quot;1&quot; Fill=&quot;#8CFFFFFF&quot; Height=&quot;18&quot; Margin=&quot;2,0,2,0&quot; RadiusY=&quot;1&quot; RadiusX=&quot;1&quot; Width=&quot;19&quot;/&gt;
                    &lt;/Grid&gt;
                    &lt;Popup x:Name=&quot;Popup&quot;/&gt;
                &lt;/Grid&gt;
            &lt;/ControlTemplate&gt;
        &lt;/Setter.Value&gt;
    &lt;/Setter&gt;
&lt;/Style&gt;
</pre>
<p>You then reference this style in your DatePicker control as follows:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;controls:DatePicker Style=&quot;{StaticResource IsoDatePickerStyle}&quot; /&gt;
</pre>
<p>And there you go, a several hundred line solution to a one line problem.  For shame Microsoft.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikecousins.com/localizing-a-silverlight-datepicker-control-a-study-in-pain-thresholds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mango App Challenge winner!</title>
		<link>http://www.mikecousins.com/mango-app-challenge-winner/</link>
		<comments>http://www.mikecousins.com/mango-app-challenge-winner/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 04:03:17 +0000</pubDate>
		<dc:creator>Mike Cousins</dc:creator>
				<category><![CDATA[Shuttr]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[shuttr]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://blog.mikecousins.com/?p=477</guid>
		<description><![CDATA[So a little bit ago my second Windows Phone app was approved. http://blog.shuttr.com/2011/11/20/shuttr-photographers-now-have-a-windows-phone-app-too/ Here are my two apps up on the Windows Phone Marketplace: http://www.windowsphone.com/en-CA/publishers/Shuttr Once the approval came through I filled out the form on the Mango App Challenge page. https://www.microsoft.com/canada/offers-promotions/mango-app-challenge/Default.aspx I didn&#8217;t hear anything back for a while, so I contacted Paul Laberge (@plaberge) on Twitter.  He got back to me immediately and before long I was declared a winner!  The phones that they were offering were a bit disappointing, so I have...]]></description>
			<content:encoded><![CDATA[<p>So a little bit ago my second Windows Phone app was approved.</p>
<p><a href="http://blog.shuttr.com/2011/11/20/shuttr-photographers-now-have-a-windows-phone-app-too/">http://blog.shuttr.com/2011/11/20/shuttr-photographers-now-have-a-windows-phone-app-too/</a></p>
<p>Here are my two apps up on the Windows Phone Marketplace:</p>
<p><a href="http://www.windowsphone.com/en-CA/publishers/Shuttr">http://www.windowsphone.com/en-CA/publishers/Shuttr</a></p>
<p>Once the approval came through I filled out the form on the Mango App Challenge page.</p>
<p><a href="https://www.microsoft.com/canada/offers-promotions/mango-app-challenge/Default.aspx">https://www.microsoft.com/canada/offers-promotions/mango-app-challenge/Default.aspx</a></p>
<p>I didn&#8217;t hear anything back for a while, so I contacted Paul Laberge (@plaberge) on Twitter.  He got back to me immediately and before long I was declared a winner!  The phones that they were offering were a bit disappointing, so I have asked to be put on a waiting list for a newer model.  I would like to play with a Windows Phone and I&#8217;m kind of a gadget snob.  I like fresh phones, I cannot lie.</p>
<p>Kudos to Microsoft for running a great promotion.  I&#8217;m happy that I did it, it gave me the kick in the pants that I needed to get started writing some mobile apps.  Hopefully I&#8217;ll keep up the pace and get Android and  iOS apps for <a title="Shuttr" href="http://shuttr.com">Shuttr</a> released as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikecousins.com/mango-app-challenge-winner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Windows Phone 7 application published!</title>
		<link>http://www.mikecousins.com/first-windows-phone-7-application-published/</link>
		<comments>http://www.mikecousins.com/first-windows-phone-7-application-published/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 03:05:21 +0000</pubDate>
		<dc:creator>Mike Cousins</dc:creator>
				<category><![CDATA[Shuttr]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[shuttr]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://blog.mikecousins.com/?p=388</guid>
		<description><![CDATA[Well, my first application has been published. http://windowsphone.com/s?appid=e995f3ee-9fd4-4e60-bdba-a30168099cd1 My first attempt was a bit of a probe to see what the process is like. I whipped the app together in about an hour and it was quite basic. I wanted to see: If I would be rejected What I would be rejected for What the timelines are like Turns out I was rejected in about 2 or 3 days for two reasons.  I had no error handling in my data requests so it would crash...]]></description>
			<content:encoded><![CDATA[<p>Well, my first application has been published.</p>
<p><a title="http://windowsphone.com/s?appid=e995f3ee-9fd4-4e60-bdba-a30168099cd1" href="http://windowsphone.com/s?appid=e995f3ee-9fd4-4e60-bdba-a30168099cd1">http://windowsphone.com/s?appid=e995f3ee-9fd4-4e60-bdba-a30168099cd1</a></p>
<p>My first attempt was a bit of a probe to see what the process is like. I whipped the app together in about an hour and it was quite basic. I wanted to see:</p>
<ul>
<li>If I would be rejected</li>
<li>What I would be rejected for</li>
<li>What the timelines are like</li>
</ul>
<p>Turns out I was rejected in about 2 or 3 days for two reasons.  I had no error handling in my data requests so it would crash in airplane mode and I had no progress bars while I was retrieving data from the server!  I put those in last Thursday and submitted it again and today I received my approval.  Pretty cool stuff!</p>
<p>My one concern so far is that the time from when I was told that my app was published until it came online was a bit long and there was no feedback on this process.  It took about 8 hours or so, but it&#8217;s up there now in all of it&#8217;s glory.</p>
<p>Now to make the photographer app and then move on to Android and iOS.  Halfway to my free phone from the <a title="Mango App Challenge" href="http://blog.mikecousins.com/2011/10/04/windows-phone-7-development-beginning/">Mango App Challenge</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikecousins.com/first-windows-phone-7-application-published/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a JSON API in ASP.NET MVC 3</title>
		<link>http://www.mikecousins.com/writing-a-json-api-in-asp-net-mvc-3/</link>
		<comments>http://www.mikecousins.com/writing-a-json-api-in-asp-net-mvc-3/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 17:41:02 +0000</pubDate>
		<dc:creator>Mike Cousins</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Shuttr]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[shuttr]]></category>

		<guid isPermaLink="false">http://blog.mikecousins.com/?p=378</guid>
		<description><![CDATA[Here is a snippet of the source for the current API on Shuttr. The repositories are bound using Ninject so that our code is unit testable. As you can see, the actual call is pretty simple using LINQ, anonymous objects and the new JSON helpers in .Net.]]></description>
			<content:encoded><![CDATA[<p>Here is a snippet of the source for the current API on <a href="http://shuttr.com" title="Shuttr" target="_blank">Shuttr</a>.</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Shuttr.Domain.Abstract;

namespace Shuttr.Web.Controllers
{
    /// &lt;summary&gt;
    /// This controller provides our public API.  It can be consumed by mobile or desktop applications.
    /// &lt;/summary&gt;
    public class ApiController : Controller
    {
        private IFolderRepository _folderRepository;
        private IPhotoRepository _photoRepository;
        private IPhotographerRepository _photographerRepository;

        /// &lt;summary&gt;
        /// Constructor
        /// &lt;/summary&gt;
        public ApiController(IFolderRepository folderRepository, IPhotoRepository photoRepository, IPhotographerRepository photographerRepository)
        {
            _folderRepository = folderRepository;
            _photoRepository = photoRepository;
            _photographerRepository = photographerRepository;
        }

        /// &lt;summary&gt;
        /// Returns the full list of directory photographers.
        /// &lt;/summary&gt;
        public JsonResult Photographers()
        {
            return Json(_photographerRepository.DirectoryPhotographers.Select(p =&gt; new { Id = p.Id, Name = p.GallerySetting.GalleryName, City = p.DirectorySetting.City, Province = p.DirectorySetting.Province, Sports = p.DirectorySetting.Sports, Weddings = p.DirectorySetting.Weddings}).ToList(), JsonRequestBehavior.AllowGet);
        }
    }
}
</pre>
<p>The repositories are bound using Ninject so that our code is unit testable.  As you can see, the actual call is pretty simple using LINQ, anonymous objects and the new JSON helpers in .Net.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikecousins.com/writing-a-json-api-in-asp-net-mvc-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Phone AppHub Developer Account Update &#8211; Day 4</title>
		<link>http://www.mikecousins.com/windows-phone-apphub-developer-account-update-day-4/</link>
		<comments>http://www.mikecousins.com/windows-phone-apphub-developer-account-update-day-4/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 18:38:41 +0000</pubDate>
		<dc:creator>Mike Cousins</dc:creator>
				<category><![CDATA[Shuttr]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://blog.mikecousins.com/?p=362</guid>
		<description><![CDATA[Here&#8217;s the day 4 update on my Windows Phone On Friday I applied for my developer account.  Filled out a couple pages of forms, paid my $100 fee, etc.  I was then emailed to verify my account, I clicked that link and it said my account would be fully verified shortly. On Monday I got an email saying that Shuttr wasn&#8217;t found in their business database and that I needed to submit additional paperwork to verify my business.  I emailed them back my registered trade name...]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the day 4 update on my Windows Phone</p>
<ul>
<li>On Friday I applied for my developer account.  Filled out a couple pages of forms, paid my $100 fee, etc.  I was then emailed to verify my account, I clicked that link and it said my account would be fully verified shortly.</li>
<li>On Monday I got an email saying that Shuttr wasn&#8217;t found in their business database and that I needed to submit additional paperwork to verify my business.  I emailed them back my registered trade name paperwork immediately.  The email said that I would hear back within 1 business day.</li>
<li>On Tuesday I never heard anything so at the end of the day I sent them a status update email asking what was going on.</li>
<li>It&#8217;s now mid-Wednesday and I still haven&#8217;t heard anything.</li>
</ul>
<p>Off to a slow start.  Hopefully this all gets resolved soon.</p>
<p><strong>Update:</strong> 2 hours later they responded saying that they received my paperwork.  They stated that it should be verified in another business day.  Sounds good!</p>
<p><strong>Update 2</strong>: 4 hours later and I&#8217;m approved!  I&#8217;m impressed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikecousins.com/windows-phone-apphub-developer-account-update-day-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Phone 7 development beginning</title>
		<link>http://www.mikecousins.com/windows-phone-7-development-beginning/</link>
		<comments>http://www.mikecousins.com/windows-phone-7-development-beginning/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 18:54:35 +0000</pubDate>
		<dc:creator>Mike Cousins</dc:creator>
				<category><![CDATA[Shuttr]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://blog.mikecousins.com/?p=354</guid>
		<description><![CDATA[So Microsoft just launched a cool program for Canadian developers, the Mango App Challenge.  Basically, if you write two Windows Phone 7 apps you get a free Windows Phone.  I have plans to develop mobile apps for Shuttr for Android, iPhone and Windows Phone but this contest just pushed Windows Phone to the front of that list instantly! I added some new RESTful JSON APIs to Shuttr pretty easily.  ASP.NET MVC makes this dead easy.  I downloaded the Windows Phone 7.1 SDK and created my...]]></description>
			<content:encoded><![CDATA[<p>So Microsoft just launched a cool program for Canadian developers, the <a title="Mango App Challenge" href="https://www.microsoft.com/canada/offers-promotions/mango-app-challenge/Default.aspx" target="_blank">Mango App Challenge</a>.  Basically, if you write two Windows Phone 7 apps you get a free Windows Phone.  I have plans to develop mobile apps for Shuttr for Android, iPhone and Windows Phone but this contest just pushed Windows Phone to the front of that list instantly!</p>
<p>I added some new RESTful JSON APIs to Shuttr pretty easily.  ASP.NET MVC makes this dead easy.  I downloaded the Windows Phone 7.1 SDK and created my first application.  Within an hour I had it consuming the API that I had created to display the photographers in the directory.  Pretty cool!</p>
<p>To submit the apps I had to create a Windows App Hub account.  It seems to be the most expensive of the different mobile platforms for a developer account, it&#8217;s $100/year.  I signed up as a company so that I could release the apps as Shuttr.  Yesterday I got an email asking for more proof of my company so I sent them back my registered trade name papers.  We&#8217;ll see what happens there.  I&#8217;ve heard of some big delays in Apple&#8217;s process so I&#8217;m hoping Microsoft is a bit faster in approving these accounts.  I&#8217;ll keep you guys updated.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikecousins.com/windows-phone-7-development-beginning/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Relic + Windows Azure package for NuGet</title>
		<link>http://www.mikecousins.com/new-relic-windows-azure-package-for-nuget/</link>
		<comments>http://www.mikecousins.com/new-relic-windows-azure-package-for-nuget/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 17:24:27 +0000</pubDate>
		<dc:creator>Mike Cousins</dc:creator>
				<category><![CDATA[Shuttr]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[nuget]]></category>

		<guid isPermaLink="false">http://blog.mikecousins.com/?p=343</guid>
		<description><![CDATA[Installing New Relic on Windows Azure is a bit of a pain so I&#8217;ve created a NuGet package for it to make it dead easy. I&#8217;ll keep it updated with the latest NewRelic releases. Make sure you go to New Relic first to sign up and get your key. Performance monitoring will never be the same after you do! http://newrelic.com The package will be available through your NuGet package manager.  You can view it on the web as well: http://nuget.org/List/Packages/NewRelicWindowsAzure Once you install the NuGet...]]></description>
			<content:encoded><![CDATA[<p>Installing New Relic on Windows Azure is a bit of a pain so I&#8217;ve created a NuGet package for it to make it dead easy. I&#8217;ll keep it updated with the latest NewRelic releases.</p>
<p>Make sure you go to New Relic first to sign up and get your key. Performance monitoring will never be the same after you do!</p>
<p><a href="http://newrelic.com">http://newrelic.com</a></p>
<p>The package will be available through your NuGet package manager.  You can view it on the web as well:</p>
<p><a href="http://nuget.org/List/Packages/NewRelicWindowsAzure">http://nuget.org/List/Packages/NewRelicWindowsAzure</a></p>
<p>Once you install the NuGet package you will need to follow these instructions to finish your setup before depolyment:</p>
<p><a href="https://support.newrelic.com/help/kb/dotnet/installing-the-net-agent-on-azure">https://support.newrelic.com/help/kb/dotnet/installing-the-net-agent-on-azure</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikecousins.com/new-relic-windows-azure-package-for-nuget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

