<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4412878736726215017</id><updated>2011-12-28T01:25:03.658+02:00</updated><category term='LINQ'/><category term='C++/CLI'/><category term='Vista'/><category term='Dependency Visualizer'/><category term='Visual Studio'/><category term='personal'/><category term='Powershell'/><category term='robocopy'/><category term='WLW'/><category term='70-536'/><category term='Bug'/><category term='MSBuild'/><category term='Win7'/><category term='TechEd'/><category term='tip'/><category term='C#'/><category term='Orcas'/><category term='3D'/><category term='WCF'/><category term='UAC'/><category term='WiX'/><category term='databinding'/><category term='xcopy'/><category term='Expressions'/><category term='Humor'/><category term='WPF'/><category term='.NET'/><category term='Quiz'/><title type='text'>Mostly tech related...</title><subtitle type='html'>random ramblings about mostly tech stuff...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>98</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-4253097077966870549</id><published>2011-05-15T20:13:00.001+03:00</published><updated>2011-05-15T20:13:46.380+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Expressions'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Expressionistic copying</title><content type='html'>&lt;p&gt;Recently I had the need of cloning a number of object, traditionally you’d have to use reflection based techniques if you wanted a generic solution, (unless you go really hardcore with Reflection.Emit)&lt;/p&gt;  &lt;p&gt;The sample code below only accounts for public properties, but in many cases that isn’t enough.&lt;/p&gt;  &lt;p&gt;Given the performance implications of using reflection, and the fact that you are allowed to include blocks in expressions in .NET 4 I figured I’d do a small experiment and micro-benchmark comparing these two approaches:&lt;/p&gt;  &lt;p&gt;I have an entity I want to copy like so &lt;/p&gt;  &lt;p&gt;   &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Entity&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color: blue"&gt;public int &lt;/span&gt;Foo { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Bar { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Baz { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;        &lt;span style="color: blue"&gt;public int &lt;/span&gt;Foo2 { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Bar2 { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Baz2 { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;        &lt;span style="color: blue"&gt;public int &lt;/span&gt;Foo3 { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Bar3 { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;        &lt;span style="color: blue"&gt;public string &lt;/span&gt;Baz3 { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;I implemented reflection based copy like so (with some room for optimizations):&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ReflectionObjectCopier &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;IObjectCopier&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color: blue"&gt;#region &lt;/span&gt;IObjectCopier Members&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;public void &lt;/span&gt;Copy&amp;lt;T&amp;gt;(T fromObj, T toObj)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;var &lt;/span&gt;properties = &lt;span style="color: blue"&gt;from &lt;/span&gt;prop &lt;span style="color: blue"&gt;in &lt;/span&gt;fromObj.GetType().GetProperties(&lt;span style="color: #2b91af"&gt;BindingFlags&lt;/span&gt;.Public | &lt;br /&gt;                                                                          &lt;span style="color: #2b91af"&gt;BindingFlags&lt;/span&gt;.Instance | &lt;br /&gt;                                                                          &lt;span style="color: #2b91af"&gt;BindingFlags&lt;/span&gt;.FlattenHierarchy)&lt;br /&gt;                             &lt;span style="color: blue"&gt;where &lt;/span&gt;prop.CanRead &amp;amp;&amp;amp; prop.CanWrite&lt;br /&gt;                             &lt;span style="color: blue"&gt;select &lt;/span&gt;prop;&lt;br /&gt;            &lt;span style="color: blue"&gt;foreach &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;PropertyInfo &lt;/span&gt;pi &lt;span style="color: blue"&gt;in &lt;/span&gt;properties)&lt;br /&gt;            {&lt;br /&gt;                pi.SetValue(toObj, pi.GetValue(fromObj, &lt;span style="color: blue"&gt;null&lt;/span&gt;), &lt;span style="color: blue"&gt;null&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;#endregion&lt;br /&gt;    &lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;When using this copying 10 000 objects takes 250ms or so.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;However, if I create an expression that performs the copying directly it only takes 10ms (with subsequent testruns only taking 4, when reusing the cached expression). That is a pretty decent saving if you ask me.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ExpressionObjectCopier &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;IObjectCopier&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Type&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt; cache = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;Type&lt;/span&gt;, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;Action&lt;/span&gt;&amp;lt;T,T&amp;gt; CreateCopier&amp;lt;T&amp;gt;()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;ParameterExpression &lt;/span&gt;fromParam = &lt;span style="color: #2b91af"&gt;Expression&lt;/span&gt;.Parameter(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(T), &lt;span style="color: #a31515"&gt;&amp;quot;from&amp;quot;&lt;/span&gt;);&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;ParameterExpression &lt;/span&gt;toParam = &lt;span style="color: #2b91af"&gt;Expression&lt;/span&gt;.Parameter(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(T), &lt;span style="color: #a31515"&gt;&amp;quot;to&amp;quot;&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;LambdaExpression &lt;/span&gt;exp = &lt;span style="color: #2b91af"&gt;Expression&lt;/span&gt;.Lambda(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Action&lt;/span&gt;&amp;lt;T, T&amp;gt;),&lt;br /&gt;                &lt;span style="color: #2b91af"&gt;Expression&lt;/span&gt;.Block(&lt;br /&gt;                    &lt;span style="color: blue"&gt;from &lt;/span&gt;prop &lt;span style="color: blue"&gt;in typeof&lt;/span&gt;(T).GetProperties(&lt;span style="color: #2b91af"&gt;BindingFlags&lt;/span&gt;.Public | &lt;br /&gt;                                                         &lt;span style="color: #2b91af"&gt;BindingFlags&lt;/span&gt;.Instance | &lt;br /&gt;                                                         &lt;span style="color: #2b91af"&gt;BindingFlags&lt;/span&gt;.FlattenHierarchy)&lt;br /&gt;                    &lt;span style="color: blue"&gt;where &lt;/span&gt;prop.CanRead &amp;amp;&amp;amp; prop.CanWrite&lt;br /&gt;                    &lt;span style="color: blue"&gt;select &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Expression&lt;/span&gt;.Assign(&lt;span style="color: #2b91af"&gt;Expression&lt;/span&gt;.Property(toParam, prop), &lt;br /&gt;                                             &lt;span style="color: #2b91af"&gt;Expression&lt;/span&gt;.Property(fromParam, prop))&lt;br /&gt;                ),&lt;br /&gt;                fromParam,&lt;br /&gt;                toParam);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Action&lt;/span&gt;&amp;lt;T, T&amp;gt; copier = (&lt;span style="color: #2b91af"&gt;Action&lt;/span&gt;&amp;lt;T, T&amp;gt;)exp.Compile();&lt;br /&gt;            cache[&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(T)] = copier;&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;copier;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;#region &lt;/span&gt;IObjectCopier Members&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;public void &lt;/span&gt;Copy&amp;lt;T&amp;gt;(T fromObj, T toObj)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;object &lt;/span&gt;action;&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Action&lt;/span&gt;&amp;lt;T,T&amp;gt; copier;&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(!cache.TryGetValue(fromObj.GetType(), &lt;span style="color: blue"&gt;out &lt;/span&gt;action))&lt;br /&gt;            {&lt;br /&gt;                copier = CreateCopier&amp;lt;T&amp;gt;();&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: blue"&gt;else&lt;br /&gt;            &lt;/span&gt;{&lt;br /&gt;                copier = (&lt;span style="color: #2b91af"&gt;Action&lt;/span&gt;&amp;lt;T, T&amp;gt;)action;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            copier(fromObj, toObj);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue"&gt;#endregion&lt;br /&gt;    &lt;/span&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The above code obviously isn’t production quality…&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-4253097077966870549?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/4253097077966870549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=4253097077966870549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4253097077966870549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4253097077966870549'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2011/05/expressionistic-copying.html' title='Expressionistic copying'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-2193247347017626616</id><published>2010-11-02T00:14:00.001+02:00</published><updated>2010-11-02T00:14:54.454+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Timeline – or restyling controls</title><content type='html'>&lt;p&gt;One nice thing with WPF that is slightly different is that the controls are lookless. This means that you can re-style or apply a different template altogether if the behavior of a standard control is what you want, but the looks are not.&lt;/p&gt;  &lt;p&gt;A real world example: At work we recently needed to show a list of items with associated timestamps, in a way so that the time differences between them are easily determined at a glance.&lt;/p&gt;  &lt;p&gt;Thanks to the lookless controls of WPF I was able to solve this simply by using a ListBox with re-templated ListBoxItems giving the following result:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_LpLq8Xaj1cU/TM872eUxS1I/AAAAAAAAJvI/34OMhOJPdi4/s1600-h/image%5B5%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_LpLq8Xaj1cU/TM873WOp3FI/AAAAAAAAJvM/U_45JZgnyZk/image_thumb%5B1%5D.png?imgmax=800" width="175" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The style is defined as follows:&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Style &lt;/span&gt;&lt;span style="color: red"&gt;TargetType&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;ListBoxItem&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Key&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;TimelineStyle&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter &lt;/span&gt;&lt;span style="color: red"&gt;Property&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;SnapsToDevicePixels&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;true&amp;quot;/&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter &lt;/span&gt;&lt;span style="color: red"&gt;Property&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;OverridesDefaultStyle&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;true&amp;quot;/&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter &lt;/span&gt;&lt;span style="color: red"&gt;Property&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;FocusVisualStyle&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;Null&lt;/span&gt;&lt;span style="color: blue"&gt;}&amp;quot;/&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter &lt;/span&gt;&lt;span style="color: red"&gt;Property&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Template&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ControlTemplate &lt;/span&gt;&lt;span style="color: red"&gt;TargetType&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;ListBoxItem&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;StackPanel &lt;/span&gt;&lt;span style="color: red"&gt;Orientation&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Vertical&amp;quot;&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Border      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Border&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;Padding&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;2&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;CornerRadius&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;2&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;BorderThickness&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;2&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;SnapsToDevicePixels&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;true&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ContentPresenter &lt;/span&gt;&lt;span style="color: blue"&gt;/&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Border&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Grid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Rectangle &lt;/span&gt;&lt;span style="color: red"&gt;Width&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;2&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Stroke&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;LightBlue&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;Height&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;TimeToNext&lt;/span&gt;&lt;span style="color: blue"&gt;, &lt;/span&gt;&lt;span style="color: red"&gt;Converter&lt;/span&gt;&lt;span style="color: blue"&gt;={&lt;/span&gt;&lt;span style="color: #a31515"&gt;StaticResource &lt;/span&gt;&lt;span style="color: red"&gt;HeightConverter&lt;/span&gt;&lt;span style="color: blue"&gt;}}&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Center&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Center&amp;quot;/&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;TextBlock &lt;/span&gt;&lt;span style="color: red"&gt;Text&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;TimeToNext&lt;/span&gt;&lt;span style="color: blue"&gt;, &lt;/span&gt;&lt;span style="color: red"&gt;Converter&lt;/span&gt;&lt;span style="color: blue"&gt;={&lt;/span&gt;&lt;span style="color: #a31515"&gt;StaticResource &lt;/span&gt;&lt;span style="color: red"&gt;DurationConverter&lt;/span&gt;&lt;span style="color: blue"&gt;}}&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;Background&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;White&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Center&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Center&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;FontSize&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;8&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;Foreground&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Gray&amp;quot;/&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Grid&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;StackPanel&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ControlTemplate.Triggers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Trigger &lt;/span&gt;&lt;span style="color: red"&gt;Property&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;IsSelected&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;Value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;true&amp;quot;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter &lt;/span&gt;&lt;span style="color: red"&gt;TargetName&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Border&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;Property&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;BorderBrush&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color: red"&gt;Value&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Blue&amp;quot;/&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Trigger&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;ControlTemplate.Triggers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;ControlTemplate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Setter&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Style&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;      &lt;br /&gt;&lt;font color="#000000"&gt;and and the listbox uses the style like this:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListBox &lt;/span&gt;&lt;span style="color: red"&gt;ItemsSource&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;DataItems&lt;/span&gt;&lt;span style="color: blue"&gt;}&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;ItemContainerStyle&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;StaticResource &lt;/span&gt;&lt;span style="color: red"&gt;TimelineStyle&lt;/span&gt;&lt;span style="color: blue"&gt;}&amp;quot; /&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The style uses two converters, but those should be fairly trivial.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Setting FocusVisualStyle to {x:Null} is done to hide the indication of keyboard focus, as unless it is fixed properly, will be more confusing than helpful. Fixing it properly is left as an exercise for the reader.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-2193247347017626616?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/2193247347017626616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=2193247347017626616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2193247347017626616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2193247347017626616'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2010/11/timeline-or-restyling-controls.html' title='Timeline – or restyling controls'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_LpLq8Xaj1cU/TM873WOp3FI/AAAAAAAAJvM/U_45JZgnyZk/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-2885935246480893217</id><published>2010-02-06T00:16:00.001+02:00</published><updated>2010-02-06T00:16:32.760+02:00</updated><title type='text'>MCTS</title><content type='html'>&lt;p&gt;Today I passed the second certification exam 70-502. So now I’m officially a Microsoft Certified Technology Specialist: .NET Framework 3.5, Windows Presentation Foundation Applications.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-2885935246480893217?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/2885935246480893217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=2885935246480893217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2885935246480893217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2885935246480893217'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2010/02/mcts.html' title='MCTS'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7279824204696281809</id><published>2010-02-01T18:59:00.001+02:00</published><updated>2010-02-01T18:59:06.831+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tip'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Nullable&lt;T&gt; and IFormattable</title><content type='html'>&lt;p&gt;If you ever tried to format a nullable type you would soon realize that you cannot directly as Nullable&amp;lt;T&amp;gt; does not implement IFormattable and thus you only have object.ToString() available.&lt;/p&gt;  &lt;p&gt;This is easily fixed using an extension method:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;public static class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;NullableExtensions&lt;br /&gt;   &lt;/span&gt;{&lt;br /&gt;       &lt;span style="color: blue"&gt;public static string &lt;/span&gt;ToString&amp;lt;T&amp;gt;(&lt;br /&gt;           &lt;span style="color: blue"&gt;this &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Nullable&lt;/span&gt;&amp;lt;T&amp;gt; nullable,&lt;br /&gt;           &lt;span style="color: blue"&gt;string &lt;/span&gt;format,&lt;br /&gt;           &lt;span style="color: #2b91af"&gt;IFormatProvider &lt;/span&gt;formatProvider)&lt;br /&gt;           &lt;span style="color: blue"&gt;where &lt;/span&gt;T : &lt;span style="color: blue"&gt;struct&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;IFormattable&lt;br /&gt;       &lt;/span&gt;{&lt;br /&gt;           &lt;span style="color: blue"&gt;if &lt;/span&gt;(!nullable.HasValue) &lt;span style="color: blue"&gt;return string&lt;/span&gt;.Empty;&lt;br /&gt;           T notNull = nullable.Value;&lt;br /&gt;           &lt;span style="color: blue"&gt;return &lt;/span&gt;notNull.ToString(format, formatProvider);&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;and you can use it e.g. like so:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;            DateTime&lt;/span&gt;? foo = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;br /&gt;            ...&lt;br /&gt;            foo.ToString(&lt;span style="color: #a31515"&gt;&amp;quot;t&amp;quot;&lt;/span&gt;, &lt;span style="color: #2b91af"&gt;CultureInfo&lt;/span&gt;.CurrentCulture);&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7279824204696281809?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7279824204696281809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7279824204696281809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7279824204696281809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7279824204696281809'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2010/02/nullable-and-iformattable.html' title='Nullable&amp;lt;T&amp;gt; and IFormattable'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-2478034796454523099</id><published>2010-01-21T22:06:00.001+02:00</published><updated>2010-01-21T22:06:32.592+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='MSBuild'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>WPF project building inside of Visual Studio but not with MSBuild/TFSBuild</title><content type='html'>&lt;p&gt;At work, I recently run into a strange build error when building from MSBuild and TFSBuild while the same solution built inside of Visual Studio 2008 just fine.&lt;/p&gt;  &lt;p&gt;The error message was:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;error MC3015: The attached property '?' is not defined on '?' or one of its base classes.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;(obviously with real names instead of the questionmarks)&lt;/p&gt;  &lt;p&gt;Feeding the above into google provided the following solution to the issue:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;One of the differences between building in VS and command line is that a WPF build in VS defaults to &lt;/p&gt;    &lt;p&gt;&amp;lt;AlwaysCompileMarkupFilesInSeparateDomain&amp;gt;true&amp;lt;/AlwaysCompileMarkupFilesInSeparateDomain&amp;gt;.     &lt;br /&gt;Outside of VS, the default is false.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;(Answer by &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/00907c94-c6b2-4bf1-98f9-113c5c4392d8?prof=required&amp;amp;ppud=4"&gt;Rob Relyea&lt;/a&gt;) &lt;/p&gt;  &lt;p&gt;Adding that to the relevant .csproj made the project build successfully.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-2478034796454523099?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/2478034796454523099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=2478034796454523099' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2478034796454523099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2478034796454523099'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2010/01/wpf-project-building-inside-of-visual.html' title='WPF project building inside of Visual Studio but not with MSBuild/TFSBuild'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-185290573533378133</id><published>2009-11-30T22:37:00.001+02:00</published><updated>2009-11-30T22:39:31.372+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='70-536'/><title type='text'>MeasureUp FAIL</title><content type='html'>&lt;p&gt;I’m currently studying for the 70-536 on my way towards MCTS certification.&lt;/p&gt;  &lt;p&gt;I have the self-paced training kit and thought I’d do the Training Kit Exam Prep “Powered by MeasureUp”&lt;/p&gt;  &lt;p&gt;Things go without technical issues until I get to scoring.&lt;/p&gt;  &lt;p&gt;Then I am greeted with:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;---------------------------     &lt;br /&gt;Application Message      &lt;br /&gt;---------------------------      &lt;br /&gt;An unanticipated error has occurred in the application.InsertScoreHistory &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;[Microsoft OLE DB Provider for ODBC Drivers] [3604] [Microsoft][ODBC Microsoft Access Driver] Syntax error in date in query expression '#30.11.2009 21:51:40#'.     &lt;br /&gt;---------------------------      &lt;br /&gt;OK&amp;#160;&amp;#160; Cancel&amp;#160;&amp;#160; &lt;br /&gt;---------------------------&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Trying to review a particular answer fails with:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;---------------------------     &lt;br /&gt;Application Message      &lt;br /&gt;---------------------------      &lt;br /&gt;An unanticipated error has occurred in the application.GoToQuestionSelected &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;[Microsoft.VisualBasic] [13] Conversion from string &amp;quot;7.&amp;quot; to type 'Short' is not valid.     &lt;br /&gt;---------------------------      &lt;br /&gt;OK&amp;#160;&amp;#160; Cancel&amp;#160;&amp;#160; &lt;br /&gt;---------------------------&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I then eventually end up at the &lt;a href="http://www.measureup.com/Site/display_article.aspx?AudienceID=&amp;amp;id=1175"&gt;FAQ page at MeasureUp&lt;/a&gt; and find&lt;/p&gt;  &lt;p&gt;“&lt;em&gt;&lt;strong&gt;I'm receiving Error: Mismatch 13.&lt;/strong&gt;      &lt;br /&gt;&lt;/em&gt;&lt;font color="#ff0000" size="4"&gt;&lt;strong&gt;In order for tests to display correctly, your computer's regional settings should be set to English (United States).&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;In the control panel, please double click on the icon labeled Regional Settings. Please choose English (United States), and click the box that says &amp;quot;use default properties for this input locale.&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Alternatively, in the regional settings, look at the Currency tab. If it is set the decimal symbol to . (dot) instead of , (coma), that may be enough to get it working properly.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;If the trouble persists, try setting the keyboard language layout to English (United States). In the control panel, double click on the icon labeled &amp;quot;Keyboard&amp;quot;. Then click on the tab labeled input locales. Select the Add button. And then choose English (United States) as the input locale.&lt;/em&gt;”&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;W T F !?!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;It’s kinda ironic that one of the skills measured is “Implementing &lt;strong&gt;globalization&lt;/strong&gt;, … in a .NET Framework application”&lt;/p&gt;  &lt;p&gt;What’s even more tragic is that if I actually DO change to en-us, trying to start a new test fails, this time with:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;---------------------------     &lt;br /&gt;Application Message      &lt;br /&gt;---------------------------      &lt;br /&gt;An unanticipated error has occurred in the application.PreviousSessionTestRecord &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier"&gt;[Microsoft.VisualBasic] [13] Conversion from string &amp;quot;30.11.2009 21:58:26&amp;quot; to type 'Date' is not valid.     &lt;br /&gt;---------------------------      &lt;br /&gt;OK&amp;#160;&amp;#160; Cancel&amp;#160;&amp;#160; &lt;br /&gt;---------------------------&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-185290573533378133?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/185290573533378133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=185290573533378133' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/185290573533378133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/185290573533378133'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2009/11/measureup-fail.html' title='MeasureUp FAIL'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-416533736481747515</id><published>2009-11-10T23:01:00.001+02:00</published><updated>2009-11-10T23:01:03.167+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Bug'/><title type='text'>roleProvider app.config parsing troubles</title><content type='html'>&lt;p&gt;I recently had the pleasure of trying to get our RC out the door, while doing that we realized that for whatever reason, Microsoft seems to use a non-standard parser for the app.config file.&lt;/p&gt;  &lt;p&gt;Basically this does not work:&lt;/p&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.web&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;roleManager &lt;/span&gt;&lt;span style="color: red"&gt;defaultProvider&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;MyCustomProvider&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;enabled&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;true&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;providers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;clear&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;clear&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;MyCustomProvider&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Namespace.MyCustomProvider, MyAssembly&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;providers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;roleManager&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.web&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;p&gt;While this does:&lt;/p&gt;  &lt;p&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.web&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;roleManager &lt;/span&gt;&lt;span style="color: red"&gt;defaultProvider&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;MyCustomProvider&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;enabled&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;true&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;providers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;clear&lt;/span&gt;&lt;span style="color: blue"&gt;/&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;MyCustomProvider&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Namespace.MyCustomProvider, MyAssembly&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;providers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;#160; &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;roleManager&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;     &lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.web&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt; &lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;p&gt;Of course, the well known commercial installer making tool we are using insists of creating the former… :(&lt;/p&gt;  &lt;p&gt;A workaround is to throw the file through an identity XSLT transform in a custom tool / custom action run after custom actions from said vendor have done their job.&lt;/p&gt;  &lt;p&gt;Oh, the bug reported on connect is already closed as &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=508146"&gt;Won’t Fix&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-416533736481747515?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/416533736481747515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=416533736481747515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/416533736481747515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/416533736481747515'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2009/11/roleprovider-appconfig-parsing-troubles.html' title='roleProvider app.config parsing troubles'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7107341126011517311</id><published>2009-09-02T18:18:00.001+03:00</published><updated>2009-09-02T18:18:42.878+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Win7'/><title type='text'>Windows Live Movie Maker - FAIL</title><content type='html'>&lt;p&gt;As I wanted to edit some movies, and Windows 7 no longer includes Windows Movie Maker I had to give Windows Live Movie Maker a try, as based on the name you’d assume it does something similar?&lt;/p&gt;  &lt;p&gt;Turns out I was wrong. This application seems to be geared towards dropping a number of photos and creating a “movie” and not actually editing movies.&lt;/p&gt;  &lt;p&gt;While you can import video from a DV camera, it does not split the imported video into scenes, instead it chops it into pieces, the size of which you can determine by dragging a slider !?! And to make matters worse, it does not bother to extract thumbnails from the individual pieces but instead uses what seems to be the first frame of the entire movie. Good luck finding the pieces you need.&lt;/p&gt;  &lt;p&gt;Of course, the timeline also seemed unnecessary to include …&lt;/p&gt;  &lt;p&gt;Time to look for a Video editor, Windows Live Movie Maker is not one.&lt;/p&gt;  &lt;p&gt;&amp;lt;/rant&amp;gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7107341126011517311?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7107341126011517311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7107341126011517311' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7107341126011517311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7107341126011517311'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2009/09/windows-live-movie-maker.html' title='Windows Live Movie Maker - FAIL'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-4353106890725837121</id><published>2009-03-03T00:18:00.001+02:00</published><updated>2009-03-03T00:18:07.279+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Generating GUIDs</title><content type='html'>&lt;p&gt;This may seem trivial but here we go:&lt;/p&gt;  &lt;p&gt;I recently created an installer with WIX and obviously had to create a number of GUIDs along the way. While there is a &amp;quot;Create GUID&amp;quot; option in the Tools menu it has a number of drawbacks:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Clicking around a UI with a mouse is not the most efficient thing in the world&lt;/li&gt;    &lt;li&gt;There is not an immediately suitable format available, registry format is closest, but braces need to be removed and the rest uppercased&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The obvious? solution to this problem is to create a macro like the following:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Public Sub &lt;/span&gt;CreateWixGuid()&lt;br /&gt;    &lt;span style="color: blue"&gt;Dim &lt;/span&gt;g &lt;span style="color: blue"&gt;As &lt;/span&gt;Guid = Guid.NewGuid()&lt;br /&gt;    &lt;span style="color: blue"&gt;Dim &lt;/span&gt;textSelection &lt;span style="color: blue"&gt;As &lt;/span&gt;EnvDTE.TextSelection&lt;br /&gt;&lt;br /&gt;    textSelection = &lt;span style="color: blue"&gt;CType&lt;/span&gt;(DTE.ActiveDocument.Selection(), EnvDTE.TextSelection)&lt;br /&gt;    textSelection.Text = g.ToString(&lt;span style="color: #a31515"&gt;&amp;quot;D&amp;quot;&lt;/span&gt;).ToUpper()&lt;br /&gt;&lt;span style="color: blue"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;and assign a keyboard shortcut to it (I chose Ctrl+G,Ctrl+G), and voil&amp;#224; a GUID in the correct format is generated and inserted.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&amp;#160;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-4353106890725837121?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/4353106890725837121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=4353106890725837121' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4353106890725837121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4353106890725837121'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2009/03/generating-guids.html' title='Generating GUIDs'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5114510799136892482</id><published>2008-11-11T22:04:00.001+02:00</published><updated>2008-11-11T22:04:01.229+02:00</updated><title type='text'>How to not do validation</title><content type='html'>&lt;p&gt;Yesterday when I was trying to do some online shopping I the e-commerce system in use perfomed input validation in a slightly suboptimal way. Here is what happened:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;To be able check out the stuff in my shopping basket I had to create an account.&lt;/li&gt;    &lt;li&gt;To create an account I had to enter username, password and address.&lt;/li&gt;    &lt;li&gt;Go to checkout&lt;/li&gt;    &lt;li&gt;Confirm to use the just entered address as the shipping address&lt;/li&gt;    &lt;li&gt;On the following page where the pay button should be there's this small note &amp;quot;The city is not long enough&amp;quot;&amp;#160; WTF!?!&lt;/li&gt;    &lt;li&gt;Try again with the city name in the other language as it is longer&lt;/li&gt;    &lt;li&gt;Same story &amp;quot;The city is not long enough&amp;quot; ...&lt;/li&gt;    &lt;li&gt;Only when changing the primary address the order goes through&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;A validation rule stating that the city cannot be just three letters are just plain stupid, secondly &lt;strong&gt;if&lt;/strong&gt; there is a need to use stupid validation rules, then do the validation when the data is &lt;strong&gt;entered&lt;/strong&gt; and not when it is used ...&lt;/p&gt;  &lt;p&gt;This &lt;a href="http://www.makeuseof.com/tech-fun/sorry-your-password-is-not-long-enough-pic/" target="_blank"&gt;comic&lt;/a&gt; comes to mind.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5114510799136892482?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5114510799136892482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5114510799136892482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5114510799136892482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5114510799136892482'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/11/how-to-not-do-validation.html' title='How to not do validation'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5545567516960512568</id><published>2008-11-08T00:21:00.001+02:00</published><updated>2008-11-08T00:21:25.591+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='databinding'/><title type='text'>Debugging WPF databinding issues</title><content type='html'>&lt;p&gt;Lately due to switching teams and project I've been doing much more WPF than before. I cannot say I have fully mastered the learning curve yet but I'm getting better and it is an interesting journey.&lt;/p&gt;  &lt;p&gt;Occasionally the data bindings does not work as expected and then it is nice to get more information about them in order to figure out what went wrong.&lt;/p&gt;  &lt;p&gt;The following is useful when you want to know why a particular binding is misbehaving (or rather you want to know where you screwed up...)&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;diagnostics&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;clr-namespace:System.Diagnostics;assembly=WindowsBase&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: red"&gt;ItemsSource&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;{&lt;/span&gt;&lt;span style="color: #a31515"&gt;Binding &lt;/span&gt;&lt;span style="color: red"&gt;&amp;lt;snip&amp;gt;&lt;/span&gt;&lt;span style="color: blue"&gt;, &lt;/span&gt;&lt;span style="color: red"&gt;diagnostics&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;PresentationTraceSources&lt;/span&gt;&lt;span style="color: blue"&gt;.TraceLevel=High}&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The above information and MUCH more is presented by &lt;a href="http://www.beacosta.com/blog/?p=52" target="_blank"&gt;Beatriz Stollnitz&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;(This post is also a 'reminder to self')&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5545567516960512568?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5545567516960512568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5545567516960512568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5545567516960512568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5545567516960512568'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/11/debugging-wpf-databinding-issues.html' title='Debugging WPF databinding issues'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-724273915369248198</id><published>2008-11-03T19:20:00.001+02:00</published><updated>2008-11-03T19:20:37.876+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# quiz 9/?</title><content type='html'>&lt;p&gt;Consider the following:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;Guid &lt;/span&gt;globallyUnique1 = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;();&lt;br /&gt;&lt;span style="color: #2b91af"&gt;Guid &lt;/span&gt;globallyUnique2 = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Guid&lt;/span&gt;();&lt;br /&gt;&lt;span style="color: blue"&gt;if &lt;/span&gt;(globallyUnique1 == globallyUnique2)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color: #a31515"&gt;&amp;quot;This cannot be&amp;quot;&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: blue"&gt;else&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color: #a31515"&gt;&amp;quot;Everything is well&amp;quot;&lt;/span&gt;);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;What is shown? Why?&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-724273915369248198?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/724273915369248198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=724273915369248198' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/724273915369248198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/724273915369248198'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/11/c-quiz-9.html' title='C# quiz 9/?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-848779229577865211</id><published>2008-10-15T00:23:00.001+03:00</published><updated>2008-10-15T00:23:45.625+03:00</updated><title type='text'>Sandcastle to dead tree format woes</title><content type='html'>&lt;p&gt;For reasons partially unknown to me, I was tasked with converting Sandcastle generated API documentation to dead tree format.&lt;/p&gt;  &lt;p&gt;The best way seems to be feeding some magic XSLT to Sandcastle that would that would directly create PDF via XSL-FO or DocBook or whatever. However, I haven't been able to find such a thing and I'm not ready to put down that kind of work to create it myself at this point.&lt;/p&gt;  &lt;p&gt;Another option I pursued was to print the CHM to XPS/PDF but this has its own cons. Firstly directly printing from CHM viewer strips CSS rendering ugliness. This is correctable by finding the correct html file from %TEMP% and a little search/replace magic and providing the stylesheets and images.&lt;/p&gt;  &lt;p&gt;Having gotten this far I found out that the stylesheet needs to use something else but relative font size to keep the text legible.&lt;/p&gt;  &lt;p&gt;Now as if this wasn't enough the browser or at least the PDF/XPS &amp;quot;printer&amp;quot; chokes on the sheer amount of input, still not finished after N hours, and this just for the documentation of a smallish test assembly. :(&lt;/p&gt;  &lt;p&gt;This does not look feasible at this point.&lt;/p&gt;  &lt;p&gt;Bright ideas appreciated!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-848779229577865211?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/848779229577865211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=848779229577865211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/848779229577865211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/848779229577865211'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/10/sandcastle-to-dead-tree-format-woes.html' title='Sandcastle to dead tree format woes'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-209263281267995607</id><published>2008-04-03T22:48:00.001+03:00</published><updated>2008-04-03T22:48:21.778+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# quiz 8/?</title><content type='html'>&lt;p&gt;Now it's time for some one regarding serialization:&lt;/p&gt; &lt;p&gt;Given this serializable class:&lt;/p&gt;&lt;pre class="code"&gt;    [&lt;span style="color: rgb(43,145,175)"&gt;Serializable&lt;/span&gt;]&lt;br /&gt;    &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Victim&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; InstanceCount;&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; Data { &lt;span style="color: rgb(0,0,255)"&gt;get&lt;/span&gt;; &lt;span style="color: rgb(0,0,255)"&gt;set&lt;/span&gt;; }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; Victim() {&lt;br /&gt;            InstanceCount++;&lt;br /&gt;            Data = 2;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;and the following test code:&lt;/p&gt;&lt;pre class="code"&gt;    &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Program&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; Main(&lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;[] args) {&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Victim&lt;/span&gt; v = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Victim&lt;/span&gt;();&lt;br /&gt;            v.Data = 3;&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;BinaryFormatter&lt;/span&gt; serial = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;BinaryFormatter&lt;/span&gt;();&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;MemoryStream&lt;/span&gt; ms = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;MemoryStream&lt;/span&gt;();&lt;br /&gt;            serial.Serialize(ms, v);            &lt;br /&gt;            ms.Seek(0, &lt;span style="color: rgb(43,145,175)"&gt;SeekOrigin&lt;/span&gt;.Begin);&lt;br /&gt;            v = (&lt;span style="color: rgb(43,145,175)"&gt;Victim&lt;/span&gt;)serial.Deserialize(ms);&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163,21,21)"&gt;"Data {0}"&lt;/span&gt;, v.Data);&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163,21,21)"&gt;"Instances {0}"&lt;/span&gt;, &lt;span style="color: rgb(43,145,175)"&gt;Victim&lt;/span&gt;.InstanceCount);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;What is the output, and why?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-209263281267995607?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/209263281267995607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=209263281267995607' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/209263281267995607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/209263281267995607'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/04/c-quiz-8.html' title='C# quiz 8/?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-958371723686340377</id><published>2008-04-03T21:25:00.001+03:00</published><updated>2008-04-03T21:25:49.668+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# quiz 7/?</title><content type='html'>&lt;p&gt;If we compile the following code to a dll, for example using the following command line:&lt;/p&gt; &lt;p&gt;csc.exe /t:library Library.cs&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;namespace&lt;/span&gt; Library {&lt;br /&gt;    &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Library&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;const&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; FOO = 1;&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;readonly&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; BAR = 2;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;And refer those in our test program:&lt;/p&gt;&lt;pre class="code"&gt;    &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Program&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; Main(&lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;[] args) {&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(Library.&lt;span style="color: rgb(43,145,175)"&gt;Library&lt;/span&gt;.FOO);&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(Library.&lt;span style="color: rgb(43,145,175)"&gt;Library&lt;/span&gt;.BAR);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Now, if we change FOO to 10 and BAR to 12 and recompile Library.dll &lt;strong&gt;without&lt;/strong&gt; recompiling the test program, what is the output when we run the test program?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-958371723686340377?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/958371723686340377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=958371723686340377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/958371723686340377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/958371723686340377'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/04/c-quiz-7.html' title='C# quiz 7/?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5521423217679696864</id><published>2008-04-03T19:53:00.001+03:00</published><updated>2008-04-03T19:53:55.813+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# quiz: 6/?</title><content type='html'>&lt;p&gt;Consider the following:&lt;/p&gt;&lt;pre class="code"&gt;    &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; m_foo;&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; Foo {&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;get&lt;/span&gt; { &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; m_foo; }&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; set_Foo(&lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; value) {&lt;br /&gt;            m_foo = value;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;What happens when you compile, and why?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5521423217679696864?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5521423217679696864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5521423217679696864' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5521423217679696864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5521423217679696864'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/04/c-quiz-6.html' title='C# quiz: 6/?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1718524591061448412</id><published>2008-04-02T22:10:00.001+03:00</published><updated>2008-04-02T22:10:18.143+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# quiz: 5/?</title><content type='html'>&lt;p&gt;Consider a console application with the following Main:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;        static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; Main(&lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;[] args) {&lt;br /&gt;            System.Threading.&lt;span style="color: rgb(43,145,175)"&gt;Timer&lt;/span&gt; t = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Timer&lt;/span&gt;(dummy =&amp;gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163,21,21)"&gt;"In callback: "&lt;/span&gt; + &lt;span style="color: rgb(43,145,175)"&gt;DateTime&lt;/span&gt;.Now);&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;GC&lt;/span&gt;.Collect();&lt;br /&gt;&lt;br /&gt;            }, &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;, 0, 1000);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.ReadLine();&lt;br /&gt;            t = &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;;&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;What does the code do? Does it matter if it is compiled Debug or Release, if so, why?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;(To give proper credit where credit is due, this example is heavily inspired by CLR via C# by Jeffrey Richter)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1718524591061448412?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1718524591061448412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1718524591061448412' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1718524591061448412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1718524591061448412'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/04/c-quiz-5.html' title='C# quiz: 5/?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-4312303421946079605</id><published>2008-04-02T18:11:00.000+03:00</published><updated>2008-04-01T18:12:56.985+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# quiz: 4/?</title><content type='html'>&lt;p&gt;Given the following code:&lt;/p&gt;&lt;pre class="code"&gt;    &lt;span style="color: rgb(0,0,255)"&gt;internal&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; Foo { &lt;span style="color: rgb(0,0,255)"&gt;get&lt;/span&gt;; &lt;span style="color: rgb(0,0,255)"&gt;set&lt;/span&gt;; }&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; Bar { &lt;span style="color: rgb(0,0,255)"&gt;get&lt;/span&gt;; &lt;span style="color: rgb(0,0,255)"&gt;set&lt;/span&gt;; }&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;#if&lt;/span&gt; CUSTOM&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;override&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; GetHashCode() {&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; Foo.GetHashCode() ^ Bar.GetHashCode();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;override&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;bool&lt;/span&gt; Equals(&lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt; obj) {&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt;.ReferenceEquals(obj, &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;)) &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;false&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; t = obj &lt;span style="color: rgb(0,0,255)"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (t != &lt;span style="color: rgb(0,0,255)"&gt;default&lt;/span&gt;(&lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt;)) {&lt;br /&gt;                &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; (Foo == t.Foo) &amp;amp;&amp;amp; (Bar == t.Bar);&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;false&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;#endif&lt;br /&gt;&lt;/span&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;and the following test code:&lt;/p&gt;&lt;pre class="code"&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt;, &lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;&amp;gt; dict = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Dictionary&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt;, &lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;&amp;gt;();&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; foo = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; { Foo = 1, Bar = 2 };&lt;br /&gt;            dict[foo] = &lt;span style="color: rgb(163,21,21)"&gt;"Hello World"&lt;/span&gt;;&lt;br /&gt;            foo.Bar = 42;&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (dict.ContainsKey(foo)) {&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163,21,21)"&gt;"it's there"&lt;/span&gt;);&lt;br /&gt;            } &lt;span style="color: rgb(0,0,255)"&gt;else&lt;/span&gt; {&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163,21,21)"&gt;"it's not"&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Answer the following questions:&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;With CUSTOM not defined, what does the test code print?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If CUSTOM is defined, does it change the outcome?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;What if Test is changed to a &lt;strong&gt;struct&lt;/strong&gt; and CUSTOM is not defined, what is the output?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If Test is a struct and CUSTOM is defined, what happens?&lt;/li&gt;&lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-4312303421946079605?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/4312303421946079605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=4312303421946079605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4312303421946079605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4312303421946079605'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/04/c-quiz-4.html' title='C# quiz: 4/?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-368824857329151760</id><published>2008-04-01T17:53:00.001+03:00</published><updated>2008-04-01T17:53:44.574+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# quiz: 3/?</title><content type='html'>&lt;p&gt;Consider the following class:&lt;/p&gt;&lt;pre class="code"&gt;    &lt;span style="color: rgb(0,0,255)"&gt;internal&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; {&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; Code { &lt;span style="color: rgb(0,0,255)"&gt;get&lt;/span&gt;; &lt;span style="color: rgb(0,0,255)"&gt;set&lt;/span&gt;; }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;bool&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;operator&lt;/span&gt; ==(&lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; lhs, &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; rhs) {&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt;.ReferenceEquals(lhs, rhs)) &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;true&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (lhs == &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt; || rhs == &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;) {&lt;br /&gt;                &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;false&lt;/span&gt;;&lt;br /&gt;            } &lt;span style="color: rgb(0,0,255)"&gt;else&lt;/span&gt; {&lt;br /&gt;                &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; lhs.Code == rhs.Code;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;bool&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;operator&lt;/span&gt; != (&lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; lhs, &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; rhs) {&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; !(lhs == rhs);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;What is the outcome of the following test code, and why?&lt;/p&gt;&lt;pre class="code"&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; test1 = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; { Code = 42 };&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; test2 = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Test&lt;/span&gt; { Code = 42 };&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (test1 != test2) {&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163,21,21)"&gt;"different"&lt;/span&gt;);&lt;br /&gt;            } &lt;span style="color: rgb(0,0,255)"&gt;else&lt;/span&gt; {&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163,21,21)"&gt;"equals"&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-368824857329151760?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/368824857329151760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=368824857329151760' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/368824857329151760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/368824857329151760'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/04/c-quiz-3.html' title='C# quiz: 3/?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7076727716093445362</id><published>2008-03-31T20:15:00.005+03:00</published><updated>2008-04-01T12:32:17.280+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# quiz: 2/?</title><content type='html'>&lt;p&gt;Continuing on the series of C# and/or .NET Framework short questions:&lt;/p&gt;&lt;pre class="code"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; Foo(&lt;span style="color: rgb(43, 145, 175);"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&amp;gt; bar) {&lt;br /&gt;          bar = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&amp;gt;();&lt;br /&gt;          &lt;span style="color: rgb(0, 128, 0);"&gt;// ...&lt;br /&gt;&lt;/span&gt;        }&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;With the method above and the code below:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;        List&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&amp;gt; bar = &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;;&lt;br /&gt;      Foo(bar);&lt;br /&gt;      &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (bar != &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;) {&lt;br /&gt;          &lt;span style="color: rgb(43, 145, 175);"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163, 21, 21);"&gt;"populated"&lt;/span&gt;);&lt;br /&gt;      } &lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt; {&lt;br /&gt;          &lt;span style="color: rgb(43, 145, 175);"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163, 21, 21);"&gt;"still null"&lt;/span&gt;);&lt;br /&gt;      }&lt;/pre&gt;If or else ?&lt;br /&gt;&lt;br /&gt;EDIT: fixed typo in code sample.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7076727716093445362?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7076727716093445362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7076727716093445362' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7076727716093445362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7076727716093445362'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/03/c-quiz-2.html' title='C# quiz: 2/?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-9072903898636430920</id><published>2008-03-31T20:15:00.003+03:00</published><updated>2008-03-31T20:15:53.408+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# quiz: 1/?</title><content type='html'>&lt;p&gt;I'm starting a series with small questions C# and/or .NET Framework related questions:&lt;/p&gt; &lt;p&gt;First out, NaN values:&lt;/p&gt;&lt;pre class="code"&gt;            &lt;span style="color: rgb(0,0,255)"&gt;double&lt;/span&gt; foo = &lt;span style="color: rgb(0,0,255)"&gt;double&lt;/span&gt;.NaN;&lt;br /&gt;            &lt;span style="color: rgb(0,128,0)"&gt;// ...&lt;br /&gt;&lt;/span&gt;            &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (foo == &lt;span style="color: rgb(0,0,255)"&gt;double&lt;/span&gt;.NaN) {&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163,21,21)"&gt;"NaN"&lt;/span&gt;);&lt;br /&gt;            } &lt;span style="color: rgb(0,0,255)"&gt;else&lt;/span&gt; {&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163,21,21)"&gt;"a number"&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;If or else ?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-9072903898636430920?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/9072903898636430920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=9072903898636430920' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/9072903898636430920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/9072903898636430920'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/03/c-quiz-1.html' title='C# quiz: 1/?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-2634997499785521748</id><published>2008-03-19T19:52:00.001+02:00</published><updated>2008-03-19T19:52:01.345+02:00</updated><title type='text'>Safari - first impressions</title><content type='html'>&lt;p&gt;I thought that I might give it a shot after all so I installed it. First impressions:&lt;/p&gt; &lt;p&gt;- it's a memory hog! 4 sites in 4 tabs consumes a whopping 210MB, while Firefox 3 beta 4 for the same sites consumes "only" 74MB&lt;/p&gt; &lt;p&gt;- the UI is ugly&lt;/p&gt; &lt;p&gt;- scroll wheel doesn't work properly in bookmarks&lt;/p&gt; &lt;p&gt;- close tab X button on the left !?! &lt;/p&gt; &lt;p&gt;- As I don't have mouse gestures, I often right-click and choose back. If I happen to have the cursor over a word, (quite likely), safari chooses to select the word and only select search with google or copy. WTF?&lt;/p&gt; &lt;p&gt;...my default browser isn't changing.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-2634997499785521748?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/2634997499785521748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=2634997499785521748' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2634997499785521748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2634997499785521748'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/03/safari-first-impressions.html' title='Safari - first impressions'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1136438920913678989</id><published>2008-03-18T22:13:00.001+02:00</published><updated>2008-03-18T22:13:24.136+02:00</updated><title type='text'>Safari for Windows - Apple spamming users</title><content type='html'>&lt;p&gt;I have an ipod, and therefore I have ITunes installed. Today Apple Software Update popped up and greeted me with the following totally unrelated thing: Safari 3.1 (22.65Mb)&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;Safari for Windows is the fastest and easiest-to-use web browser for the PC.&amp;nbsp; It displays web pages faster than any other browser and is filled with innovative features -- all delivered in an efficient and elegant user interface.&lt;/em&gt; &lt;p&gt;&lt;em&gt;For more information on Safari 3.1, please visit &lt;/em&gt;&lt;a href="http://docs.info.apple.com/article.html?artnum=307467"&gt;&lt;em&gt;http://docs.info.apple.com/article.html?artnum=307467&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Hmm, that sounds too good to be true.  &lt;p&gt;...and why does it notify me about it in the first place?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1136438920913678989?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1136438920913678989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1136438920913678989' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1136438920913678989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1136438920913678989'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/03/safari-for-windows-apple-spamming-users.html' title='Safari for Windows - Apple spamming users'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1654498615807446222</id><published>2008-03-14T00:08:00.001+02:00</published><updated>2008-03-14T00:09:00.302+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Gotcha: Hidden [Flags] attribute on bitfield enumerations</title><content type='html'>&lt;p&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Just got reminded of a still &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=273645" target="_blank"&gt;unfixed bug&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;Consider an enumeration of the following kind:&lt;/p&gt;&lt;pre class="code"&gt;    &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;    &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; Modes enumeration&lt;br /&gt;&lt;/span&gt;    &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;    [&lt;span style="color: rgb(43,145,175)"&gt;Flags&lt;/span&gt;]&lt;br /&gt;    &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;enum&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Modes&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; Yes&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;        Foo = 1,&lt;br /&gt;        &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; No&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;        Bar = 2,&lt;br /&gt;        &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; Maybe&lt;br /&gt;&lt;/span&gt;        &lt;span style="color: rgb(128,128,128)"&gt;///&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; &lt;/span&gt;&lt;span style="color: rgb(128,128,128)"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;&lt;/span&gt;        Both = Foo|Bar&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;For the user of this enumeration, it is essential to know that it in fact is a bitfield (as specified by the FlagsAttribute).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;However, &lt;strong&gt;both&lt;/strong&gt; Intellisense &lt;strong&gt;and&lt;/strong&gt; object browser fails to give any hint about this fact!?! (Yes, this occurs in both VS 2005 and VS 2008)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So for now, remember to document (within in the summary, so it is visible) this fact for your fellow developers.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1654498615807446222?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1654498615807446222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1654498615807446222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1654498615807446222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1654498615807446222'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/03/gotcha-missing-flags-attribute-on.html' title='Gotcha: Hidden [Flags] attribute on bitfield enumerations'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-625016125849899401</id><published>2008-01-15T22:25:00.001+02:00</published><updated>2008-01-15T22:25:34.441+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>New phone</title><content type='html'>&lt;p&gt;I received my new phone today, this time I thought I'd try something different for various reasons, so I got a &lt;a href="http://www.htc.com/product/03-product_htctouch_dual.htm" target="_blank"&gt;HTC Touch Dual&lt;/a&gt;. I haven't really used it enough yet to post any reviews, but first impression is quite nice. Unfortunately it still takes two weeks until I they switch over to the new SIM card (due to carrier change), so until then I cannot really use it fully. But yes, I will keep my old number...&lt;/p&gt; &lt;p&gt;On a related note, things don't seem as bright with the handsfree that I got, it was cheap yes, but first it had the wrong kind of mains plug on the charger, and secondly after I found an appropriate adapter, the thing won't charge !?!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-625016125849899401?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/625016125849899401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=625016125849899401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/625016125849899401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/625016125849899401'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/01/new-phone.html' title='New phone'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-718270098171787081</id><published>2008-01-14T00:22:00.001+02:00</published><updated>2008-01-14T00:22:12.441+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Maximizing a WPF Window to second monitor</title><content type='html'>&lt;p&gt;I'm trying to develop and application that utilizes a maximized window on the second monitor.&lt;/p&gt; &lt;p&gt;There's a few issues here. The first is that WPF doesn't offer the same information as WinForms about monitor configuration. WinForms has SystemInformation.MonitorCount and Screen.AllScreens[i].WorkingArea. WPF has SystemParameters.PrimaryScreen[Width/Height] and SystemParameters.VirtualScreen[Width/Height] which almost works (as long as you don't have more than two monitors) but not really. So back to using WinForms API...&lt;/p&gt; &lt;p&gt;Secondly, the obvious solution to display a form maximized on second screen was to me the following:&lt;/p&gt;&lt;pre class="code"&gt;                fullScreenWindow.WindowStartupLocation = &lt;span style="color: rgb(43,145,175)"&gt;WindowStartupLocation&lt;/span&gt;.Manual;&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;Debug&lt;/span&gt;.Assert(System.Windows.Forms.&lt;span style="color: rgb(43,145,175)"&gt;SystemInformation&lt;/span&gt;.MonitorCount &amp;gt; 1);&lt;br /&gt;                &lt;br /&gt;                System.Drawing.&lt;span style="color: rgb(43,145,175)"&gt;Rectangle&lt;/span&gt; workingArea = System.Windows.Forms.&lt;span style="color: rgb(43,145,175)"&gt;Screen&lt;/span&gt;.AllScreens[1].WorkingArea;&lt;br /&gt;                fullScreenWindow.Left = workingArea.Left;&lt;br /&gt;                fullScreenWindow.Top = workingArea.Top;&lt;br /&gt;                fullScreenWindow.Width = workingArea.Width;&lt;br /&gt;                fullScreenWindow.Height = workingArea.Height;&lt;br /&gt;                fullScreenWindow.WindowState = &lt;span style="color: rgb(43,145,175)"&gt;WindowState&lt;/span&gt;.Maximized;&lt;br /&gt;                fullScreenWindow.WindowStyle = &lt;span style="color: rgb(43,145,175)"&gt;WindowStyle&lt;/span&gt;.None;&lt;br /&gt;                fullScreenWindow.Topmost = &lt;span style="color: rgb(0,0,255)"&gt;true&lt;/span&gt;; &lt;br /&gt;                fullScreenWindow.Show();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;However&lt;/strong&gt;, when you try that you'll end up with a topmost maximized window on your &lt;strong&gt;primary&lt;/strong&gt; display, which was not what we wanted.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Turns out that we cannot maximize the window until it's loaded. So by hooking the Loaded event of fullScreenWindow and handling the event along the lines of:&lt;/p&gt;&lt;pre class="code"&gt;        &lt;span style="color: rgb(0,0,255)"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; Window_Loaded(&lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt; sender, &lt;span style="color: rgb(43,145,175)"&gt;RoutedEventArgs&lt;/span&gt; e) {&lt;br /&gt;            WindowState = &lt;span style="color: rgb(43,145,175)"&gt;WindowState&lt;/span&gt;.Maximized;&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;...it works.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Oh, and you want to make certain that you are running a dual monitor configuration so you do not put the window somewhere where it is off-screen.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-718270098171787081?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/718270098171787081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=718270098171787081' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/718270098171787081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/718270098171787081'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/01/maximizing-wpf-window-to-second-monitor.html' title='Maximizing a WPF Window to second monitor'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-8654311891934583750</id><published>2008-01-09T21:58:00.001+02:00</published><updated>2008-01-09T22:04:37.598+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>UIAutomation - testing Calculator</title><content type='html'>&lt;p&gt;I recently discovered that the UIAutomation library provided in .NET 3.0 doesn't only work for managed code but for any code.&lt;/p&gt; &lt;p&gt;Should you so be inclined, here's how to test that calc.exe provided by Windows in fact can calculate 2+2 correctly.&lt;/p&gt;&lt;pre class="code"&gt;        [&lt;span style="color: rgb(43,145,175)"&gt;TestMethod&lt;/span&gt;]&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; TestAddTwoAndTwo() {&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Process&lt;/span&gt; calc = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Process&lt;/span&gt;();&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;ProcessStartInfo&lt;/span&gt; startInfo = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ProcessStartInfo&lt;/span&gt;();&lt;br /&gt;            startInfo.FileName = &lt;span style="color: rgb(163,21,21)"&gt;@"c:\windows\system32\calc.exe"&lt;/span&gt;;&lt;br /&gt;            calc.StartInfo = startInfo;&lt;br /&gt;            calc.Start();&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Thread&lt;/span&gt;.Sleep(500);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt; window = &lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt;.FromHandle(calc.MainWindowHandle);&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt; twoButton = FindAutomationElementByName(window, &lt;span style="color: rgb(163,21,21)"&gt;"2"&lt;/span&gt;);&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt; plusButton = FindAutomationElementByName(window, &lt;span style="color: rgb(163,21,21)"&gt;"+"&lt;/span&gt;);&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt; equalsButton = FindAutomationElementByName(window, &lt;span style="color: rgb(163,21,21)"&gt;"="&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt; editField = window.FindFirst(&lt;span style="color: rgb(43,145,175)"&gt;TreeScope&lt;/span&gt;.Descendants, &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;AndCondition&lt;/span&gt;(&lt;br /&gt;                 &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;PropertyCondition&lt;/span&gt;(&lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt;.ClassNameProperty, &lt;span style="color: rgb(163,21,21)"&gt;"Edit"&lt;/span&gt;),&lt;br /&gt;                 &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;PropertyCondition&lt;/span&gt;(&lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt;.IsValuePatternAvailableProperty, &lt;span style="color: rgb(0,0,255)"&gt;true&lt;/span&gt;)));&lt;br /&gt;            calc.WaitForInputIdle();            &lt;br /&gt;&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;InvokePattern&lt;/span&gt; clickTwo = twoButton.GetCurrentPattern(&lt;span style="color: rgb(43,145,175)"&gt;InvokePattern&lt;/span&gt;.Pattern) &lt;span style="color: rgb(0,0,255)"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;InvokePattern&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;InvokePattern&lt;/span&gt; clickEquals = equalsButton.GetCurrentPattern(&lt;span style="color: rgb(43,145,175)"&gt;InvokePattern&lt;/span&gt;.Pattern) &lt;span style="color: rgb(0,0,255)"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;InvokePattern&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;InvokePattern&lt;/span&gt; clickPlus = plusButton.GetCurrentPattern(&lt;span style="color: rgb(43,145,175)"&gt;InvokePattern&lt;/span&gt;.Pattern) &lt;span style="color: rgb(0,0,255)"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;InvokePattern&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            clickTwo.Invoke();&lt;br /&gt;&lt;br /&gt;            clickPlus.Invoke();&lt;br /&gt;&lt;br /&gt;            clickTwo.Invoke();&lt;br /&gt;&lt;br /&gt;            clickEquals.Invoke();&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;ValuePattern&lt;/span&gt; pattern = editField.GetCurrentPattern(&lt;span style="color: rgb(43,145,175)"&gt;ValuePattern&lt;/span&gt;.Pattern) &lt;span style="color: rgb(0,0,255)"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ValuePattern&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Assert&lt;/span&gt;.AreEqual(4, &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt;.Parse(pattern.Current.Value,&lt;span style="color: rgb(43,145,175)"&gt;NumberStyles&lt;/span&gt;.AllowDecimalPoint|&lt;span style="color: rgb(43,145,175)"&gt;NumberStyles&lt;/span&gt;.AllowTrailingWhite));            &lt;br /&gt;        }&lt;/pre&gt;&lt;pre class="code"&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt; FindAutomationElementByName(&lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt; parent, &lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt; name) {&lt;br /&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Condition&lt;/span&gt; c = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;PropertyCondition&lt;/span&gt;(&lt;span style="color: rgb(43,145,175)"&gt;AutomationElement&lt;/span&gt;.NameProperty, name);&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; parent.FindFirst(&lt;span style="color: rgb(43,145,175)"&gt;TreeScope&lt;/span&gt;.Descendants, c);&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You'll also want a reference to UIAutomationClient.dll and the following using:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;using&lt;/span&gt; System.Windows.Automation;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;To find out what the application under test has eaten i.e. how to automate it, do use UISpy.exe provided with the Windows SDK .&lt;/p&gt;&lt;br /&gt;&lt;p&gt;And yes, the syntax is a tad verbose ...&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-8654311891934583750?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/8654311891934583750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=8654311891934583750' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8654311891934583750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8654311891934583750'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/01/uiautomation-testing-calculator.html' title='UIAutomation - testing Calculator'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1533667721496122610</id><published>2008-01-08T22:11:00.001+02:00</published><updated>2008-01-08T22:11:48.642+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>LINQPad - Useful Linq tool</title><content type='html'>&lt;p&gt;If you are using LINQ (or want to try it) and want to try out your query expressions dynamically you'll want to check out &lt;a href="www.linqpad.net" target="_blank"&gt;LINQPad&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;Free (as in beer) and very useful!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1533667721496122610?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1533667721496122610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1533667721496122610' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1533667721496122610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1533667721496122610'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/01/linqpad-useful-linq-tool.html' title='LINQPad - Useful Linq tool'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1886793912997718975</id><published>2008-01-06T00:29:00.001+02:00</published><updated>2008-01-06T00:31:14.670+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>LINQ - DataContext.Dispose()</title><content type='html'>&lt;p&gt;I'm playing around with LINQ for the moment. Actually I tried Entity Framework first, but could not get that to behave as I wanted (that is Table Per Class), so I let that rest for a while until they fix TPC support in a subsequent version and tried "plain" LINQ instead.&lt;/p&gt; &lt;p&gt;I can't say I'm really there yet, but one thing that bit me was that I out of old habit (or whatever) used code similar to the following:&lt;/p&gt;&lt;pre class="code"&gt;            &lt;span style="color: rgb(0,0,255)"&gt;using&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;DataClassesDataContext&lt;/span&gt; db = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;DataClassesDataContext&lt;/span&gt;();&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; (&lt;span style="color: rgb(0,0,255)"&gt;from&lt;/span&gt; user &lt;span style="color: rgb(0,0,255)"&gt;in&lt;/span&gt; db.Users &lt;br /&gt;                        &lt;span style="color: rgb(0,0,255)"&gt;where&lt;/span&gt; user.Name == name &lt;br /&gt;                        &lt;span style="color: rgb(0,0,255)"&gt;select&lt;/span&gt; user).SingleOrDefault();&lt;br /&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;..and I thought that all was well. However, when testing a little bit more I got&amp;nbsp; &lt;strong&gt;ObjectDisposedException&lt;/strong&gt;:s when returning&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; (&lt;span style="color: rgb(0,0,255)"&gt;from&lt;/span&gt; user &lt;span style="color: rgb(0,0,255)"&gt;in&lt;/span&gt; db.Users &lt;span style="color: rgb(0,0,255)"&gt;select&lt;/span&gt; user).AsEnumerable();&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;instead of &lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; (&lt;span style="color: rgb(0,0,255)"&gt;from&lt;/span&gt; user &lt;span style="color: rgb(0,0,255)"&gt;in&lt;/span&gt; db.Users &lt;span style="color: rgb(0,0,255)"&gt;select&lt;/span&gt; user).ToList();&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Turns out that even though DataContext implements &lt;strong&gt;IDisposable&lt;/strong&gt;, you should &lt;strong&gt;not&lt;/strong&gt; use a DataContext in a using statement or directly call .&lt;strong&gt;Dispose()&lt;/strong&gt; or you'll end up with lots of brokenness.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;(In addition I got all kinds of attaching and detaching issues, but I think I've sorted them now. Did I already tell you that this is my first attempt of using LINQ non-trivially?) &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1886793912997718975?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1886793912997718975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1886793912997718975' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1886793912997718975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1886793912997718975'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2008/01/linq-datacontextdispose.html' title='LINQ - DataContext.Dispose()'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7414502913957962787</id><published>2007-12-22T02:06:00.001+02:00</published><updated>2007-12-22T02:06:03.949+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>TimeSpan.Seconds vs .TotalSeconds</title><content type='html'>&lt;p&gt;The difference between the &lt;strong&gt;Seconds&lt;/strong&gt; property and the &lt;strong&gt;TotalSeconds&lt;/strong&gt; property is (or at least should be) pretty obvious, but based on experience it is a common bug to use &lt;strong&gt;.Seconds&lt;/strong&gt; when you actually mean &lt;strong&gt;.TotalSeconds&lt;/strong&gt;. For the readers out there that hasn't gotten the difference, think of a timespan of value 1 minute 23 seconds - here .Seconds is 23 and total seconds is 83.&lt;/p&gt; &lt;p&gt;As a rule of thumb, most often it's the Total variant you want, and yes, the same applies to all the other members too, (e.g. .Minutes, .Milliseconds vs. the corresponding .Total-prefixed ones)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7414502913957962787?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7414502913957962787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7414502913957962787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7414502913957962787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7414502913957962787'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/12/timespanseconds-vs-totalseconds.html' title='TimeSpan.Seconds vs .TotalSeconds'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-8013891839242095766</id><published>2007-12-21T23:17:00.001+02:00</published><updated>2007-12-21T23:17:19.408+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>"Practical Functional C#"</title><content type='html'>&lt;p&gt;I just found an interesting blog post series about practical functional C#. It starts right &lt;a href="http://www.atrevido.net/blog/2007/08/12/Practical+Functional+C+Part+I.aspx" target="_blank"&gt;here&lt;/a&gt;. Maybe I've missed something, but this feels like a fresh breath, being really down to earth and real world. I'm looking forward to future posts.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-8013891839242095766?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/8013891839242095766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=8013891839242095766' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8013891839242095766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8013891839242095766'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/12/functional-c.html' title='&amp;quot;Practical Functional C#&amp;quot;'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-3620644795639470566</id><published>2007-12-14T17:54:00.001+02:00</published><updated>2007-12-14T17:54:11.317+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Humor'/><title type='text'>"Is there a constant for tab like Environment.Newline?"</title><content type='html'>&lt;p&gt;..was a question a co-worker asked the other day. My first answer was no, as it is not really needed as a tab does not change between platforms as newline might (think Mono).&lt;/p&gt; &lt;p&gt;Then I realized, there actually *is* one, so I gave the following instructions:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Add a reference to Microsoft.VisualBasic.dll &lt;/li&gt; &lt;li&gt;add a using Microsoft.VisualBasic; statement&lt;/li&gt; &lt;li&gt;use Constants.vbTab&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;(And to avoid any misunderstandings, no, this was &lt;strong&gt;not&lt;/strong&gt; a serious suggestion.)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-3620644795639470566?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/3620644795639470566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=3620644795639470566' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3620644795639470566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3620644795639470566'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/12/there-constant-for-tab-like.html' title='&amp;quot;Is there a constant for tab like Environment.Newline?&amp;quot;'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-6127578489998089229</id><published>2007-12-11T23:32:00.001+02:00</published><updated>2007-12-11T23:32:45.276+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>"Thank you for the lasting contribution you made to Microsoft Visual Studio"</title><content type='html'>&lt;p&gt;..that's what is engraved into the glass cube I got in the mailbox today.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.google.com/simon.dahlbacka/R18B-GMg8qI/AAAAAAAAAzw/LXwUTBtTWdU/vs2008-glasscube%5B7%5D"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="391" alt="vs2008-glasscube" src="http://lh4.google.com/simon.dahlbacka/R18B_GMg8rI/AAAAAAAAAz4/hYD9Zqs3WdI/vs2008-glasscube_thumb%5B5%5D" width="404" border="0"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-6127578489998089229?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/6127578489998089229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=6127578489998089229' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6127578489998089229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6127578489998089229'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/12/you-for-lasting-contribution-you-made.html' title='&amp;quot;Thank you for the lasting contribution you made to Microsoft Visual Studio&amp;quot;'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-2165659465273106505</id><published>2007-11-29T20:28:00.001+02:00</published><updated>2007-11-29T20:28:30.742+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Visualizer'/><title type='text'>Dependency Visualizer 1.2.7</title><content type='html'>&lt;p&gt;Turns out that Dependency Visualizer requires the Visual C++ Runtime version 7.1 (2003), and no-one had noticed (or at least not reported it to me).&lt;/p&gt; &lt;p&gt;The just released 1.2.7 fixes the installer to include the necessary files, otherwise nothing has changed since 1.2.6.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-2165659465273106505?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/2165659465273106505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=2165659465273106505' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2165659465273106505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2165659465273106505'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/dependency-visualizer-127.html' title='Dependency Visualizer 1.2.7'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7177819137727718289</id><published>2007-11-28T17:29:00.001+02:00</published><updated>2007-11-28T17:29:06.580+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Interesting findings ...</title><content type='html'>&lt;p&gt;What would you say if you found a class with the following interface during a code review?&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;internal&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; Internal&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: rgb(0,128,0)"&gt;// Methods&lt;br /&gt;&lt;/span&gt;    &lt;span style="color: rgb(0,0,255)"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; CommonlyUsedGenericInstantiations_HACK();&lt;br /&gt;    &lt;span style="color: rgb(0,0,255)"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; T NullableHelper_HACK&amp;lt;T&amp;gt;() &lt;span style="color: rgb(0,0,255)"&gt;where&lt;/span&gt; T : &lt;span style="color: rgb(0,0,255)"&gt;struct&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(0,0,255)"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; SZArrayHelper_HACK&amp;lt;T&amp;gt;(SZArrayHelper oSZArrayHelper);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Suspicious to say the least ...&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The 'interesting' part here, is that the class actually exists, and not just anywhere but as System.Internal in mscorlib !&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7177819137727718289?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7177819137727718289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7177819137727718289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7177819137727718289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7177819137727718289'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/interesting-findings.html' title='Interesting findings ...'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7235358822907285935</id><published>2007-11-26T23:27:00.001+02:00</published><updated>2007-11-26T23:27:23.651+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Visualizer'/><title type='text'>Dependency Visualizer now supports VS 2008</title><content type='html'>&lt;p&gt;The just released &lt;a href="https://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=dependencyvisualizer&amp;amp;ReleaseId=8515" target="_blank"&gt;1.2.6&lt;/a&gt; version of Dependency Visualizer now supports Visual Studio 2008 solutions/projects.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7235358822907285935?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7235358822907285935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7235358822907285935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7235358822907285935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7235358822907285935'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/dependency-visualizer-now-supports-vs.html' title='Dependency Visualizer now supports VS 2008'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5983300292476885243</id><published>2007-11-19T20:25:00.001+02:00</published><updated>2007-11-19T20:25:02.810+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Visual Studio 2008 RTM released</title><content type='html'>&lt;p&gt;Visual Studio 2008 just &lt;a href="http://msdn2.microsoft.com/en-us/subscriptions/bb608344.aspx" target="_blank"&gt;released&lt;/a&gt; (to MSDN subscribers) and the &lt;a href="http://www.microsoft.com/express/vcsharp/" target="_blank"&gt;Express&lt;/a&gt; versions to the rest of you.&lt;/p&gt; &lt;p&gt;Get it now (or wait a few days to get better download speeds).&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5983300292476885243?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5983300292476885243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5983300292476885243' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5983300292476885243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5983300292476885243'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/visual-studio-2008-rtm-released.html' title='Visual Studio 2008 RTM released'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-4907803893305112918</id><published>2007-11-16T21:25:00.001+02:00</published><updated>2007-11-16T21:26:18.164+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Stepping through properties in the debugger</title><content type='html'>&lt;p&gt;Ever stepped through code in the debugger and ended up in N+1 trivial property getters before you got to the "real code" and felt frustrated?&lt;/p&gt; &lt;p&gt;Enter the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.diagnostics.debuggerstepthroughattribute.aspx" target="_blank"&gt;DebuggerStepThroughAttribute&lt;/a&gt;. MSDN says the following: &lt;em&gt;"&lt;/em&gt;&lt;a&gt;&lt;em&gt;For example, the Visual Studio 2005 debugger does not stop in a method marked with this attribute but does allow a breakpoint to be set in the method.&lt;/em&gt;&lt;/a&gt;&lt;em&gt;"&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Basically, if you need a breakpoint in there, you'll get there, otherwise Visual Studio won't bother stepping there and just steps over it, which is exactly what we want.&lt;/p&gt; &lt;p&gt;So how do you apply the attribute to a property as its attribute usage states the following? &lt;/p&gt;&lt;pre&gt;&lt;a&gt;[AttributeUsageAttribute(AttributeTargets.Class|&lt;br&gt;AttributeTargets.Struct|&lt;br&gt;AttributeTargets.Constructor|&lt;br&gt;AttributeTargets.Method, Inherited=false)]&lt;/a&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;The point is to realize that while the property itself isn't a method, both the getter and the setter actually are.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So you can do the following:&lt;/p&gt;&lt;pre class="code"&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;int&lt;/span&gt; Foo&lt;br /&gt;        {&lt;br /&gt;            [&lt;span style="color: rgb(43,145,175)"&gt;DebuggerStepThrough&lt;/span&gt;]&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;get&lt;/span&gt; { &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; m_foo; }&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;set&lt;/span&gt; { m_foo = &lt;span style="color: rgb(0,0,255)"&gt;value&lt;/span&gt;; }&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;..and now the getter has the attribute, while the setter does not.&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-4907803893305112918?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/4907803893305112918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=4907803893305112918' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4907803893305112918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4907803893305112918'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/stepping-through-properties-in-debugger.html' title='Stepping through properties in the debugger'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1052330008318343910</id><published>2007-11-15T19:09:00.001+02:00</published><updated>2007-11-15T19:09:47.873+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Programmatically enumerate WCF endpoints defined in app.config</title><content type='html'>&lt;p&gt;For various reasons you might want to enumerate all client endpoints defined in the application configuration file. &lt;/p&gt; &lt;p&gt;For future reference, this is one way to do it:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,128,0)"&gt;// Automagically find all client endpoints defined in app.config&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(43,145,175)"&gt;ClientSection&lt;/span&gt; clientSection = &lt;br /&gt;    &lt;span style="color: rgb(43,145,175)"&gt;ConfigurationManager&lt;/span&gt;.GetSection(&lt;span style="color: rgb(163,21,21)"&gt;"system.serviceModel/client"&lt;/span&gt;) &lt;span style="color: rgb(0,0,255)"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ClientSection&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(43,145,175)"&gt;ChannelEndpointElementCollection&lt;/span&gt; endpointCollection =&lt;br /&gt;    clientSection.ElementInformation.Properties[&lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;.Empty].Value &lt;span style="color: rgb(0,0,255)"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ChannelEndpointElementCollection&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(43,145,175)"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;&amp;gt; endpointNames = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;foreach&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;ChannelEndpointElement&lt;/span&gt; endpointElement &lt;span style="color: rgb(0,0,255)"&gt;in&lt;/span&gt; endpointCollection)&lt;br /&gt;{&lt;br /&gt;    endpointNames.Add(endpointElement.Name);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: rgb(0,128,0)"&gt;// use endpointNames somehow ...&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;..obviously this is not production quality code.&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1052330008318343910?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1052330008318343910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1052330008318343910' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1052330008318343910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1052330008318343910'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/programmatically-enumerate-wcf.html' title='Programmatically enumerate WCF endpoints defined in app.config'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-8571477092485811270</id><published>2007-11-14T16:18:00.001+02:00</published><updated>2007-11-14T16:18:04.749+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Comparing DateTime structs ...</title><content type='html'>&lt;p&gt;Consider the following code:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(43,145,175)"&gt;DateTime&lt;/span&gt; localTime = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;DateTime&lt;/span&gt;(2007, 11, 14, 12, 0, 0, &lt;span style="color: rgb(43,145,175)"&gt;DateTimeKind&lt;/span&gt;.Local);&lt;br /&gt;&lt;span style="color: rgb(43,145,175)"&gt;DateTime&lt;/span&gt; utcTime = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;DateTime&lt;/span&gt;(2007, 11, 14, 12, 0, 0, &lt;span style="color: rgb(43,145,175)"&gt;DateTimeKind&lt;/span&gt;.Utc);&lt;br /&gt;&lt;br /&gt;System.Diagnostics.&lt;span style="color: rgb(43,145,175)"&gt;Debug&lt;/span&gt;.Print(&lt;span style="color: rgb(163,21,21)"&gt;"Is equal ? {0}"&lt;/span&gt;, localTime == utcTime);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;What do you expect the answer to be?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;...and you probably guessed wrong as .NET actually considers them to be equal !?!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.datetime.aspx" target="_blank"&gt;MSDN&lt;/a&gt; is "somewhat fuzzy" on the subject: &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;em&gt;"Calculations and comparisons of &lt;b&gt;DateTime&lt;/b&gt; objects are only meaningful if the objects represent times in the same time zone. For that reason, if no time zone is specified for the objects, it is assumed that the developer has some external mechanism, such as an explicit variable or policy, that can be used to determine the time zone in which a &lt;b&gt;DateTime&lt;/b&gt; object was created."&lt;/em&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-8571477092485811270?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/8571477092485811270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=8571477092485811270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8571477092485811270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8571477092485811270'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/comparing-datetime-structs.html' title='Comparing DateTime structs ...'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-3682152355049340660</id><published>2007-11-05T20:01:00.001+02:00</published><updated>2007-11-05T20:01:08.868+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechEd'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Visual Studio 2008 release imminent</title><content type='html'>&lt;p&gt;&lt;a href="http://blogs.msdn.com/somasegar" target="_blank"&gt;S. Somasegar&lt;/a&gt; (Corporate Vice President, Developer Division) just announced at Teched Barcelona that Visual Studio 2008 (and .NET 3.5 Framework) will be shipped before the end of November 2007. &lt;/p&gt; &lt;p&gt;Nice!&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-3682152355049340660?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/3682152355049340660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=3682152355049340660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3682152355049340660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3682152355049340660'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/visual-studio-2008-release-imminent.html' title='Visual Studio 2008 release imminent'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-928350225334933937</id><published>2007-11-04T21:37:00.001+02:00</published><updated>2007-11-04T21:37:46.644+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Humor'/><title type='text'>Google translation</title><content type='html'>&lt;p&gt;Niklas Jansson pointed out that Google managed to screw up the translation of the Calendar print dialog.&lt;/p&gt; &lt;p&gt;The orientation combo box in Swedish has the choices "Bil", "Stående" and "Liggande", the last two makes sense but the first one translating to Car obviously does not. (The original version says auto.)&lt;/p&gt; &lt;p&gt;Funnily enough, they managed to screw up the Finnish version too, where they for the same alternative provided "Auto&lt;strong&gt;t"&lt;/strong&gt; which means "the cars", (while auto might actually have been somewhat acceptable).&lt;/p&gt; &lt;p&gt;Well, you can't always win... :)&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-928350225334933937?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/928350225334933937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=928350225334933937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/928350225334933937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/928350225334933937'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/google-translation.html' title='Google translation'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-6611284907891694427</id><published>2007-11-04T00:07:00.001+02:00</published><updated>2007-11-04T00:14:08.040+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Integrating Help2 files into VS 2005 - part 2</title><content type='html'>&lt;p&gt;The other workaround I hinted in the previous post involves a bit of manual labor the first time (or if you &lt;strong&gt;ask&lt;/strong&gt; nicely, I might just provide the needed parts), if used more than once it is IMO less painful than the ORCA route.&lt;/p&gt; &lt;p&gt;This solution takes advantage of &amp;lt;CustomTable&amp;gt; feature of WiX. By "reverse engineering" the needed table schemas out of the relevant merge module &lt;strong&gt;MSHelp2_RegTables__RTL_---_---.msm&lt;/strong&gt; we can author these tables as &amp;lt;CustomTable&amp;gt;:s and then just add &amp;lt;Row&amp;gt;:s as appropriate.&lt;/p&gt; &lt;p&gt;Next time just edit the row data and you're set.&lt;/p&gt; &lt;p&gt;For brevity, I just post one table here, but the rest can be made available upon request.&lt;/p&gt; &lt;p&gt;The tables I've used are HelpFile, HelpFileToNamespace, HelpNamespace and HelpPlugin.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;CustomTable&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Id&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;HelpFileToNamespace&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;!--&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; HelpFileToNamespace table definition &lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;--&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Column&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Type&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;PrimaryKey&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;yes&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Id&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;HelpFile_&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Nullable&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;no&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;KeyTable&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;HelpFile&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;KeyColumn&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;1&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Category&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Identifier&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Description&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Foreign key into HelpFile table (required).&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; /&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Column&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Type&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Width&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;72&lt;/span&gt;"&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;PrimaryKey&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;yes&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Id&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;HelpNamespace_&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Nullable&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;no&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;KeyTable&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;HelpNamespace&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;KeyColumn&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;1&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Category&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Identifier&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;          &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Description&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Foreign key into HelpNamespace table (required).&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;/&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;!--&lt;/span&gt;&lt;span style="color: rgb(0,128,0)"&gt; data &lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;--&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Row&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;          &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Data&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Column&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;HelpFile_&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;/span&gt;YourHelpFileKey&lt;span style="color: rgb(0,0,255)"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Data&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;          &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Data&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Column&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;HelpNamespace_&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;/span&gt;YourHelpNamespaceKey&lt;span style="color: rgb(0,0,255)"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Data&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Row&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;CustomTable&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-6611284907891694427?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/6611284907891694427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=6611284907891694427' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6611284907891694427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6611284907891694427'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/integrating-help2-files-into-vs-2005_04.html' title='Integrating Help2 files into VS 2005 - part 2'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5412999803512303152</id><published>2007-11-03T01:38:00.001+02:00</published><updated>2007-11-03T01:38:55.197+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Integrating Help2 files into VS 2005 - part 1</title><content type='html'>&lt;p&gt;For various reasons (curiosity among others) I've been playing with integrating custom API documentation into Visual Studio, this turned out to be rather laborious.&lt;/p&gt; &lt;p&gt;For future reference I thought I'd document the process here.&lt;/p&gt; &lt;p&gt;- Create the code to be documented, use xml comments and turn on the generate xml comments switch in the project settings.&lt;/p&gt; &lt;p&gt;- Install Visual Studio SDK (yes, really ...)&lt;/p&gt; &lt;p&gt;- Install &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E82EA71D-DA89-42EE-A715-696E3A4873B2&amp;amp;displaylang=en" target="_blank"&gt;Sandcastle&lt;/a&gt;&lt;/p&gt; &lt;p&gt;- Install &lt;a href="http://www.codeplex.com/SHFB" target="_blank"&gt;Sandcastle Help File Builder&lt;/a&gt;&lt;/p&gt; &lt;p&gt;- Open SHFB and create a Help2 project and customize appropriately.&lt;/p&gt; &lt;p&gt;- When the project builds successfully, open all the various .Hx? files (except .HxS) and remove the DTD reference, and from the .HxC file also the &amp;lt;CompilerOptions&amp;gt; element including contents. (For further info refer to the &lt;a href="http://helpware.net" target="_blank"&gt;helpware&lt;/a&gt; site.)&lt;/p&gt; &lt;p&gt;- Now Microsoft wants you to use the Help Collection Integration Wizard, or manually edit merge files with Orca, neither of which is any fun.&lt;/p&gt; &lt;p&gt;- WiX has a WixVSExtension that among other thing has &amp;lt;HelpFile&amp;gt;, &amp;lt;HelpFileRef&amp;gt;, &amp;lt;HelpCollection&amp;gt; and &amp;lt;PlugCollectionInto&amp;gt; elements which sound promising.&lt;/p&gt; &lt;p&gt;- The problem: the WixVSExtension is currently broken, specifically bug &lt;a href="http://sourceforge.net/tracker/index.php?func=detail&amp;amp;aid=1588180&amp;amp;group_id=105970&amp;amp;atid=642714" target="_blank"&gt;1588180&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;- The bug comments include a suggested fix that involves recompiling WiX. Due to dependency issues this seems like a PITA.&lt;/p&gt; &lt;p&gt;- There is however also another workaround ... stay tuned!&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5412999803512303152?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5412999803512303152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5412999803512303152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5412999803512303152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5412999803512303152'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/11/integrating-help2-files-into-vs-2005.html' title='Integrating Help2 files into VS 2005 - part 1'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-65412280482035568</id><published>2007-10-28T18:05:00.001+02:00</published><updated>2007-10-28T18:05:59.970+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Visualizer'/><title type='text'>Dependency Visualizer - now on CodePlex</title><content type='html'>&lt;p&gt;I finally released Dependency Visualizer as open-source on CodePlex. It's new home is now &lt;a href="http://www.codeplex.com/dependencyvisualizer" target="_blank"&gt;there&lt;/a&gt;.&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-65412280482035568?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/65412280482035568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=65412280482035568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/65412280482035568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/65412280482035568'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/10/dependency-visualizer-now-on-codeplex.html' title='Dependency Visualizer - now on CodePlex'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-3854617487212645745</id><published>2007-10-04T18:07:00.001+03:00</published><updated>2007-10-04T18:07:16.975+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Microsoft to release the source code for the .NET Framework Libraries</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I'm definitely not the first (and probably not the last) one to blog about this, but Microsoft is about to release the source code for a big part of the .NET framework. Yay! Even though &lt;a href="http://www.aisto.com/roeder/dotnet/" target="_blank"&gt;Reflector&lt;/a&gt; is nice, having the actual source code &lt;strong&gt;with comments&lt;/strong&gt; is nicer. &lt;/p&gt; &lt;p&gt;Read more here:&lt;/p&gt; &lt;p&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx"&gt;Releasing the Source Code for the .NET Framework Libraries - ScottGu's Blog&lt;/a&gt;&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-3854617487212645745?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/3854617487212645745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=3854617487212645745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3854617487212645745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3854617487212645745'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/10/microsoft-to-release-source-code-for.html' title='Microsoft to release the source code for the .NET Framework Libraries'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-8470219727063475843</id><published>2007-09-27T18:54:00.001+03:00</published><updated>2007-09-27T18:54:28.393+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Humor'/><title type='text'>Ironic, isn't it?</title><content type='html'>&lt;p&gt;&lt;a href="http://lh4.google.com/simon.dahlbacka/RvvSL7d9fiI/AAAAAAAAAxU/jlV-Sq3HSh8/Microsoft%20Windows%5B2%5D.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="134" alt="Microsoft Windows" src="http://lh4.google.com/simon.dahlbacka/RvvSM7d9fjI/AAAAAAAAAxc/CKWZWsbAzs8/Microsoft%20Windows_thumb.png" width="244" border="0"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The screenshot says it all ...&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-8470219727063475843?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/8470219727063475843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=8470219727063475843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8470219727063475843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8470219727063475843'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/09/ironic-isn-it.html' title='Ironic, isn&amp;#39;t it?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1474869318529111582</id><published>2007-09-18T19:59:00.001+03:00</published><updated>2007-09-18T19:59:12.247+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>Installing Ubuntu</title><content type='html'>&lt;p&gt;I just installed Ubuntu feisty 64bit on one of the computers. For those of you who happen to know the story about that particular computer it might seem somewhat ironic, but that's not the point of this post.&lt;/p&gt; &lt;p&gt;The installation was *smooth*, I just entered:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;partitioning info (yes, use all available disk)&lt;/li&gt; &lt;li&gt;keyboard layout&lt;/li&gt; &lt;li&gt;timezone&lt;/li&gt; &lt;li&gt;user account info&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;and that's all. After a few minutes I asked to reboot out of the livecd and into the new installation and everything just worked! (Well except for my slightly odd screen resolution of 1440x900, but I can live with that)&lt;/p&gt; &lt;p&gt;Anyone can manage such an installation, and excessive OK button clicking.&lt;/p&gt; &lt;p&gt;Kudos Ubuntu!&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1474869318529111582?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1474869318529111582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1474869318529111582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1474869318529111582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1474869318529111582'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/09/installing-ubuntu.html' title='Installing Ubuntu'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1212501020068165634</id><published>2007-09-13T00:23:00.001+03:00</published><updated>2007-09-13T00:23:25.217+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='databinding'/><title type='text'>Enumerating XAML (BAML) files in an Assembly</title><content type='html'>&lt;p&gt;I wanted to play around with XAML Pages, and wanted an application that automagically showed me a list of all included (embedded) XAML files in an assembly without me doing more than adding the XAML file to the project.&lt;/p&gt; &lt;p&gt;This turned out to be tricky until you got it...&lt;/p&gt; &lt;p&gt;Well, it is simple when you know how to do it, but until then you'll have some googling to do. (At least that is&amp;nbsp; my experience)&lt;/p&gt; &lt;p&gt;Basically, a XAML file with a build action of &lt;strong&gt;Page&lt;/strong&gt; or &lt;strong&gt;Resource&lt;/strong&gt; ends up in a .resources file named &lt;strong&gt;&amp;lt;assemblyname&amp;gt;.g.resources&lt;/strong&gt;. This .resources file contains the binary version of the XAML file (BAML).&lt;/p&gt; &lt;p&gt;Enumerating the contents of a .resources file can be done using the &lt;strong&gt;System.Resources.ResourceReader&lt;/strong&gt; class as follows:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;using&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;ResourceReader&lt;/span&gt; reader = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ResourceReader&lt;/span&gt;(&lt;span style="color: rgb(163,21,21)"&gt;"Foo.g.resources"&lt;/span&gt;))&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: rgb(0,0,255)"&gt;foreach&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;DictionaryEntry&lt;/span&gt; entry &lt;span style="color: rgb(0,0,255)"&gt;in&lt;/span&gt; reader)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(entry.Key);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;So all that's left to do is to create the application, (and no, it ain't pretty but it works):&lt;/p&gt;&lt;br /&gt;&lt;p&gt;MainForm.xaml:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Window&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;x:Class&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;AutoToc.MainForm&lt;/span&gt;"&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;    &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;xmlns&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&lt;/span&gt;"&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;    &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/span&gt;"&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;        &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;xmlns:sys&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;clr-namespace:System;assembly=system&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Title&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;AutoToc&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Height&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;400&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Width&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;600&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Loaded&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;FormLoaded&lt;/span&gt;"&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;    &amp;gt;&lt;br /&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Window.Resources&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;    &lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;HierarchicalDataTemplate&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;DataType&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;{x:Type sys:Uri}&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;BulletDecorator&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Center&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;BulletDecorator.Bullet&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;          &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Ellipse&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Fill&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;BlueViolet&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Width&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;5&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Height&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;5&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;                   &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Center&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;/&amp;gt;&lt;br /&gt;        &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;BulletDecorator.Bullet&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;TextBlock&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Text&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;{Binding Path=OriginalString}&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;                   &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Margin&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;5,0,0,0&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Center&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; /&amp;gt;&lt;br /&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;BulletDecorator&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;HierarchicalDataTemplate&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Window.Resources&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Grid&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Width&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;200&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;/&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Width&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Auto&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;/&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;ColumnDefinition&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Width&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;*&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;/&amp;gt;&lt;br /&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;TreeView&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Grid.Column&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;0&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;tocTree&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;ItemsSource&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;{Binding}&lt;/span&gt;"&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;                &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;SelectedItemChanged&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;tocTreeSelectedItemChanged&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;TreeView&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;GridSplitter&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Grid.Column&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;1&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Width&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;2&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Left&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;                    &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Stretch&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;/&amp;gt;&lt;br /&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Frame&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;contentFrame&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;Grid.Column&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;2&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;NavigationUIVisibility&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Hidden&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;br /&gt;             &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Stretch&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt; &lt;/span&gt;&lt;span style="color: rgb(255,0,0)"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;=&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;Stretch&lt;/span&gt;"&lt;span style="color: rgb(0,0,255)"&gt;/&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Grid&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163,21,21)"&gt;Window&lt;/span&gt;&lt;span style="color: rgb(0,0,255)"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;and the interesting parts of the code behind:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0,0,255)"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; FormLoaded(&lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt; sender, &lt;span style="color: rgb(43,145,175)"&gt;RoutedEventArgs&lt;/span&gt; e)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: rgb(0,128,0)"&gt;// UriCollection inherits ObservableCollection&amp;lt;Uri&amp;gt;&lt;br /&gt;&lt;/span&gt;    &lt;span style="color: rgb(43,145,175)"&gt;UriCollection&lt;/span&gt; pages = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UriCollection&lt;/span&gt;();&lt;br /&gt;    &lt;span style="color: rgb(43,145,175)"&gt;Assembly&lt;/span&gt; asm = &lt;span style="color: rgb(43,145,175)"&gt;Assembly&lt;/span&gt;.GetExecutingAssembly();&lt;br /&gt;    &lt;span style="color: rgb(43,145,175)"&gt;Stream&lt;/span&gt; stream = asm.GetManifestResourceStream(asm.GetName().Name + &lt;span style="color: rgb(163,21,21)"&gt;".g.resources"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;    DataContext = pages;&lt;br /&gt;    &lt;span style="color: rgb(0,0,255)"&gt;using&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;ResourceReader&lt;/span&gt; reader = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ResourceReader&lt;/span&gt;(stream))&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(0,0,255)"&gt;foreach&lt;/span&gt; (&lt;span style="color: rgb(43,145,175)"&gt;DictionaryEntry&lt;/span&gt; entry &lt;span style="color: rgb(0,0,255)"&gt;in&lt;/span&gt; reader)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: rgb(0,128,0)"&gt;// for some curious reason, we get "cannot locate resource"&lt;br /&gt;&lt;/span&gt;            &lt;span style="color: rgb(0,128,0)"&gt;// if we leave the .baml extension, it needs to be .xaml !?!&lt;br /&gt;&lt;/span&gt;            pages.Add(&lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Uri&lt;/span&gt;(((&lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt;)entry.Key).Replace(&lt;span style="color: rgb(163,21,21)"&gt;".baml"&lt;/span&gt;, &lt;span style="color: rgb(163,21,21)"&gt;".xaml"&lt;/span&gt;),&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;UriKind&lt;/span&gt;.Relative));&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0,0,255)"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; tocTreeSelectedItemChanged(&lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt; sender, &lt;span style="color: rgb(43,145,175)"&gt;RoutedEventArgs&lt;/span&gt; e)&lt;br /&gt;{&lt;br /&gt;    contentFrame.Source = tocTree.SelectedItem &lt;span style="color: rgb(0,0,255)"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;Uri&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;That was easy, wasn't it?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Obviously this is not production quality code but more a proof of concept, and yes, I do use it for playing around with the 3D samples...&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Obviously, it would be better to filter out non-Page xaml files, such as mainform ...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1212501020068165634?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1212501020068165634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1212501020068165634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1212501020068165634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1212501020068165634'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/09/enumerating-xaml-baml-files-in-assembly.html' title='Enumerating XAML (BAML) files in an Assembly'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-2945288481056140021</id><published>2007-09-06T23:32:00.001+03:00</published><updated>2007-09-06T23:32:25.031+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='3D'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>DiffuseMaterial.Color vs DiffuseMaterial.Brush</title><content type='html'>&lt;p&gt;I've been getting my feet wet with 3D in WPF lately, as I've been reading the new Petzold book &lt;a href="http://www.amazon.com/o/ASIN/0735623945" target="_blank"&gt;3D Programming for Windows&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;It's too early to give any review of the book yet, but back to the subject matter:&lt;/p&gt; &lt;p&gt;As I was trying the examples out I was just getting emptiness !?! I suspected I had screwed up either the MeshGeometry.Positions and/or camera directions so those I checked first, and found no differences.&lt;/p&gt; &lt;p&gt;I looked at my code, and nothing jumped out as wrong.&lt;/p&gt; &lt;p&gt;When I looked closer I noticed that I'd been using &lt;strong&gt;DiffuseMaterial.Color&lt;/strong&gt; instead of &lt;strong&gt;DiffuseMaterial.Brush&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;According to MSDN:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Brush:&lt;/strong&gt; "Brush to be applied as a Material to a 3-D model."&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Color:&lt;/strong&gt; "The color allowed to emit from the &lt;b&gt;Material&lt;/b&gt;. The default value is &lt;code&gt;#FFFFFF&lt;/code&gt;. Since all colors make up white, all colors are visible by default."&lt;/p&gt; &lt;p&gt;Obviously? .Color was the wrong choice.&lt;/p&gt; &lt;p&gt;It seems I've got plenty to learn ...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-2945288481056140021?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/2945288481056140021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=2945288481056140021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2945288481056140021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2945288481056140021'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/09/diffusematerialcolor-vs.html' title='DiffuseMaterial.Color vs DiffuseMaterial.Brush'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7035634307089437118</id><published>2007-06-26T17:23:00.001+03:00</published><updated>2007-06-26T17:23:42.093+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Humor'/><title type='text'>scottberkun.com » Blog Archive » Asshole driven development</title><content type='html'>&lt;p&gt;Nowadays with all&amp;nbsp;kinds of&amp;nbsp;development methodologies,&amp;nbsp;it's refreshing to revisit some&amp;nbsp;real-world ones (in a slightly cynical manner..)&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.scottberkun.com/blog/2007/asshole-driven-development/"&gt;scottberkun.com » Blog Archive » Asshole driven development&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7035634307089437118?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7035634307089437118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7035634307089437118' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7035634307089437118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7035634307089437118'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/06/scottberkuncom-blog-archive-asshole.html' title='scottberkun.com » Blog Archive » Asshole driven development'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-4762439805726798306</id><published>2007-06-20T00:58:00.001+03:00</published><updated>2007-06-20T00:58:06.865+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Powershell'/><title type='text'>Playing around with Powershell</title><content type='html'>&lt;p&gt;For those living under a rock the newish command shell from Microsoft called Powershell (aka 'Monad') is quite nice.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.microsoft.com/technet/scriptcenter/topics/msh/download.mspx"&gt;Get Powershell&lt;/a&gt;&lt;/p&gt; &lt;p&gt;It treats everything as object that you can pipe around and you play around with file system, registry, wmi, .net objects, com objects, custom stuff all in the same way.&lt;/p&gt; &lt;p&gt;Let's say you want to play around with WMI and look at your computer.&lt;/p&gt; &lt;p&gt;PS C:\Users\Simon&amp;gt; Get-WmiObject Win32_ComputerSystem &lt;/p&gt; &lt;p&gt;Domain&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : WORKGROUP&lt;br&gt;Manufacturer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : System manufacturer&lt;br&gt;Model&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : System name&lt;br&gt;Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : REBORN&lt;br&gt;PrimaryOwnerName&amp;nbsp;&amp;nbsp;&amp;nbsp; : Simon&lt;br&gt;TotalPhysicalMemory : 1609498624 &lt;p&gt;or let's say that you want to find the description of the 3 processes that currently uses the most CPU: &lt;p&gt;PS C:\Users\Simon&amp;gt; Get-Process |&lt;br&gt;&amp;gt;&amp;gt; sort-object -property CPU -descending |&lt;br&gt;&amp;gt;&amp;gt; select-object -first 3 -property Description&lt;br&gt;&amp;gt;&amp;gt;  &lt;p&gt;Description&lt;br&gt;-----------&lt;br&gt;Firefox&lt;br&gt;Windows Media Player&lt;br&gt;Desktop Window Manager &lt;p&gt;Or if you for some reason feel the need to show a messagebox (and yes, the messagebox did show and I hit yes): &lt;p&gt;PS C:\&amp;gt; [void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")&lt;br&gt;PS C:\&amp;gt; [Windows.Forms.MessageBox]::Show("Hello World")&lt;br&gt;OK&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-4762439805726798306?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/4762439805726798306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=4762439805726798306' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4762439805726798306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4762439805726798306'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/06/playing-around-with-powershell.html' title='Playing around with Powershell'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-8618431320199155890</id><published>2007-06-20T00:15:00.001+03:00</published><updated>2007-06-20T00:15:26.916+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Orcas'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Extension methods and Collection&lt;T&gt;</title><content type='html'>&lt;p&gt;Visual Studio Code Analysis / FxCop says in rule CA1002 not to expose List&amp;lt;T&amp;gt; but instead something like Collection&amp;lt;T&amp;gt;.&lt;/p&gt; &lt;p&gt;Now List&amp;lt;T&amp;gt; has some nice features such as &lt;/p&gt; &lt;p&gt;&lt;strong&gt;List&amp;lt;T&amp;gt; List&amp;lt;T&amp;gt;.FindAll(Predicate&amp;lt;T&amp;gt; match)&amp;nbsp;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;among others, not to mention &lt;/p&gt; &lt;p&gt;&lt;strong&gt;void List&amp;lt;T&amp;gt;.AddRange(IEnumerable&amp;lt;T&amp;gt; collection)&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Now, we could go implementing these on our own base class and return that, or go back to C style object orientation and write a static CollectionUtilities class with methods such as&lt;/p&gt; &lt;p&gt;&lt;strong&gt;static void AddRange&amp;lt;T&amp;gt;(ICollection&amp;lt;T&amp;gt; collection, IEnumerable&amp;lt;T&amp;gt; items)&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Neither of these makes me really happy.&lt;/p&gt; &lt;p&gt;Enter C# 3.0 extension methods:&lt;/p&gt; &lt;p&gt;&lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;void&lt;/span&gt; AddRange&amp;lt;T&amp;gt;(&lt;span style="color: rgb(0,0,255)"&gt;this&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;ICollection&lt;/span&gt;&amp;lt;T&amp;gt; collection, &lt;span style="color: rgb(43,145,175)"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; items) &lt;/p&gt; &lt;p&gt;{ &lt;span style="color: rgb(0,128,0)"&gt;/* implementation */&lt;/span&gt; }&lt;/p&gt; &lt;p&gt;Now due to some compiler magic we can use this method just as it had beed implemented directly in Collection&amp;lt;T&amp;gt;... Neat!&lt;/p&gt; &lt;p&gt;Another interesting tidbit is that it is in fact possible to do things like&lt;/p&gt;&lt;pre class="code"&gt;            &lt;span style="color: rgb(43,145,175)"&gt;Thing&lt;/span&gt; foo = &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (foo.IsNull())&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: rgb(43,145,175)"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(163,21,21)"&gt;"foo is null!"&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;and &lt;strong&gt;NOT&lt;/strong&gt; get a NullReferenceException due to an extension method along the lines of:&lt;/p&gt;&lt;pre class="code"&gt;        &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;bool&lt;/span&gt; IsNull(&lt;span style="color: rgb(0,0,255)"&gt;this&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;object&lt;/span&gt; value)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; value == &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;unfortunately, as they are called extension &lt;strong&gt;methods&lt;/strong&gt; it's only possible for methods and not properties and such.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-8618431320199155890?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/8618431320199155890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=8618431320199155890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8618431320199155890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8618431320199155890'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/06/extension-methods-and-collection.html' title='Extension methods and Collection&amp;lt;T&amp;gt;'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-6078401380527476204</id><published>2007-06-13T21:27:00.001+03:00</published><updated>2007-06-13T21:27:54.788+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Humor'/><title type='text'>Microsoft embedding nerdy photo in Vista DVDs? - Engadget</title><content type='html'>&lt;p&gt;&amp;nbsp;It seems some guys at Microsoft thought it would be cool to get their pictures on the Vista DVDs, and they seem to have gotten away with it!&lt;/p&gt; &lt;p&gt;Well, obviously I don't know what their managers thought of their ploy...&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.engadget.com/2007/06/13/microsoft-embedding-nerdy-photo-in-vista-dvds/"&gt;Microsoft embedding nerdy photo in Vista DVDs? - Engadget&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-6078401380527476204?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/6078401380527476204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=6078401380527476204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6078401380527476204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6078401380527476204'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/06/microsoft-embedding-nerdy-photo-in.html' title='Microsoft embedding nerdy photo in Vista DVDs? - Engadget'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-6361241642853794441</id><published>2007-06-07T00:24:00.001+03:00</published><updated>2007-06-07T00:24:06.785+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechEd'/><title type='text'>XAML as a better C#</title><content type='html'>&lt;p&gt;That was the title of Chris Anderson's talk today. Very different, and very interesting. He explained how CLR and XML fits together in XAML and as a demonstration implemented a "poor-man's Workflow Foundation".&lt;/p&gt; &lt;p&gt;The talk also had it's fair share of humorous moments, when the his computer had a mind of its own.&lt;/p&gt; &lt;p&gt;Conclusion was that although XAML &lt;strong&gt;is&lt;/strong&gt;&amp;nbsp;very powerful, it's not necessarily the best tool for all jobs.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-6361241642853794441?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/6361241642853794441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=6361241642853794441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6361241642853794441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6361241642853794441'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/06/xaml-as-better-c.html' title='XAML as a better C#'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-4470192483993128042</id><published>2007-06-05T19:37:00.001+03:00</published><updated>2007-06-05T19:37:46.149+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechEd'/><title type='text'>TechEd, day 1</title><content type='html'>&lt;p&gt;Surprisingly, our bags *did* arrive during the night, so we got our clothes, that's nice!&lt;/p&gt; &lt;p&gt;First impression, this event is HUGE. &lt;/p&gt; &lt;p&gt;The keynote was more directed towards IT professionals, so not much interesting stuff to get there.&lt;/p&gt; &lt;p&gt;Orcas seems to have gotten its official name &lt;strong&gt;Visual Studio 2008&lt;/strong&gt;, but release date should still be the end of this year.&lt;/p&gt; &lt;p&gt;You'll get as much SWAG as you want... &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-4470192483993128042?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/4470192483993128042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=4470192483993128042' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4470192483993128042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4470192483993128042'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/06/teched-day-1.html' title='TechEd, day 1'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1609936357312659878</id><published>2007-06-02T20:56:00.001+03:00</published><updated>2007-06-02T20:56:53.184+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechEd'/><title type='text'>Going to Orlando/TechEd</title><content type='html'>&lt;p&gt;The bags are packed, hopefully I didn't forget anything too important.&lt;/p&gt; &lt;p&gt;Tomorrow we fly from Turku to Orlando via Copenhagen&amp;nbsp;and Chicago. If everything goes according to plans, we'll land 10.47 PM in Orlando. (With 7 hours of time difference that is if it was 05.47 back home...)&lt;/p&gt; &lt;p&gt;It's gonna be a loong day...&lt;/p&gt; &lt;p&gt;On monday TechEd starts!&amp;nbsp;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1609936357312659878?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1609936357312659878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1609936357312659878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1609936357312659878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1609936357312659878'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/06/going-to-orlandoteched.html' title='Going to Orlando/TechEd'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5657680505325833397</id><published>2007-05-31T23:35:00.001+03:00</published><updated>2007-05-31T23:36:39.024+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WLW'/><title type='text'>Windows Live Writer beta 2</title><content type='html'>&lt;p&gt;Just noticed that WLW beta 2 is out, and I'm trying it out right now..&lt;/p&gt; &lt;p&gt;As far as I understand, it &lt;em&gt;should&lt;/em&gt; support Blogger labels, and that has been one of the IMO biggest limitations with the previous beta.&lt;/p&gt; &lt;p&gt;Hopefully this works out properly, and this will be the blogging application of choice when I'll be blogging random stuff from TechEd. Yay!&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:24484e7b-ccdb-4431-bdeb-333437c687b9" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/WLW" rel="tag"&gt;WLW&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5657680505325833397?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5657680505325833397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5657680505325833397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5657680505325833397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5657680505325833397'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/05/windows-live-writer-beta-2.html' title='Windows Live Writer beta 2'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-3810405208086713153</id><published>2007-05-28T00:17:00.000+03:00</published><updated>2007-05-28T00:18:24.638+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='Humor'/><title type='text'>Speech Recognition isn't really there yet..</title><content type='html'>&lt;br /&gt;&lt;p&gt;It seems we cannot really throw away our keyboards just yet, and only use speech recognition, as the following video clearly shows:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/KyLqUf4cdwc"/&gt;&lt;br /&gt;&lt;param name="wmode" value="transparent"/&gt;&lt;br /&gt;&lt;embed height="350" width="425" wmode="transparent" type="application/x-shockwave-flash" src="http://www.youtube.com/v/KyLqUf4cdwc"/&gt;&lt;/object&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;(Perl, is perhaps not the most "speakable" language there is, but nevertheless...)&lt;/p&gt;&lt;br /&gt;&lt;p class="zoundry_bw_tags"&gt;&lt;br /&gt;  &lt;!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com --&gt;&lt;br /&gt;  &lt;span class="ztags"&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;a href="http://technorati.com/tag/humor" class="ztag" rel="tag"&gt;humor&lt;/a&gt;, &lt;a href="http://technorati.com/tag/vista" class="ztag" rel="tag"&gt;vista&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-3810405208086713153?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/3810405208086713153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=3810405208086713153' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3810405208086713153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3810405208086713153'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/05/speech-recognition-isn-really-there-yet.html' title='Speech Recognition isn&amp;#39;t really there yet..'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5745405770427567062</id><published>2007-05-08T18:58:00.001+03:00</published><updated>2007-05-08T18:58:48.369+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MSBuild'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Different signing options depending on configuration</title><content type='html'>&lt;br /&gt;&lt;p&gt;There was a &lt;a href="http://mostlytech.blogspot.com/2007/05/editing-visual-studio-2005-project-file.html" title="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1236734&amp;amp;SiteID=1"&gt;question&lt;/a&gt; in the MSBuild newsgroup about the possibility to have different signing settings depending on configuration.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Basically, let's pretend pretend that what we want is the following:&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Debug: Delay sign using PublicKey.pk&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Release: Sign using KeyPair.pfx&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;br/&gt;From within Visual Studio it seems impossible, due to the fact that the configuration boxes are grayed out. All is not lost though, by moving the code signing options into the appropriate configurations (by &lt;a href="http://mostlytech.blogspot.com/2007/05/editing-visual-studio-2005-project-file.html#links" title="Editing a Visual Studio 2005 project file"&gt;directly editing the project file&lt;/a&gt;).&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Debug:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;PropertyGroup&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #ff0000"&gt;Condition&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'&lt;/span&gt; &lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;snip/&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;SignAssembly&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;true&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;SignAssembly&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;DelaySign&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="FONT-SIZE: 0.75em"&gt;true&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;DelaySign&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;AssemblyOriginatorKeyFile&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;PublicKey.pk&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;AssemblyOriginatorKeyFile&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;/&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;PropertyGroup&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Release:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;PropertyGroup&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #ff0000"&gt;Condition&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;'$(Configuration)|$(Platform)' == 'Release|AnyCPU'&lt;/span&gt; &lt;span style="FONT-SIZE: 0.75em"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;snip/&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;&amp;lt;SignAssembly&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;true&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;SignAssembly&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;AssemblyOriginatorKeyFile&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em"&gt;PrivateKey.pfx&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;AssemblyOriginatorKeyFile&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;lt;/&lt;span style="FONT-SIZE: 0.75em; COLOR: #a31515"&gt;PropertyGroup&lt;/span&gt;&lt;span style="FONT-SIZE: 0.75em; COLOR: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;And there you go!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;(The obvious? drawback with this method is that the signing behavior isn't directly visible from within the Visual Studio project properties.)&lt;/p&gt;&lt;br /&gt;&lt;p class="zoundry_bw_tags"&gt;&lt;br /&gt;  &lt;!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com --&gt;&lt;br /&gt;  &lt;span class="ztags"&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;a href="http://technorati.com/tag/MSBuild" class="ztag" rel="tag"&gt;MSBuild&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Visual%20Studio" class="ztag" rel="tag"&gt;Visual Studio&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5745405770427567062?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5745405770427567062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5745405770427567062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5745405770427567062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5745405770427567062'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/05/different-signing-options-depending-on.html' title='Different signing options depending on configuration'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-291815626054668764</id><published>2007-05-07T18:33:00.000+03:00</published><updated>2007-05-07T18:34:02.695+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MSBuild'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Editing a Visual Studio 2005 project file</title><content type='html'>&lt;br /&gt;&lt;p&gt;[This is not really news, just wanted to publish it somewhere so I can refer to it]&lt;/p&gt;&lt;br /&gt;&lt;p&gt;So how do you do it then?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It is simple actually:&lt;/p&gt;&lt;br /&gt;&lt;br/&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;(If the project file is under a locking source control provider e.g. Microsoft SourceSafe, you probably want to check out the project file first, as Visual Studio isn't smart enough to do it for you when you edit the file directly.)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Right-click a project in the solution explorer&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Choose "Unload project"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Right-click the same project, that now is grayed out and suffixed with &lt;strong&gt;(unavailable)&lt;/strong&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Choose "Edit &amp;lt;filename&amp;gt;"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Edit away ...&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Right-click the project, still suffixed with &lt;strong&gt;(unavailable)&lt;/strong&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Choose "Reload project"&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;There you go!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Caveat: This doesn't work under the Express versions of Visual Studio. That is, the "Unload Project" menu item is absent, you can still use the editor with schema support.&lt;/p&gt;&lt;br /&gt;&lt;p class="zoundry_bw_tags"&gt;&lt;br /&gt;  &lt;!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com --&gt;&lt;br /&gt;  &lt;span class="ztags"&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;a href="http://technorati.com/tag/MSBuild" class="ztag" rel="tag"&gt;MSBuild&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Visual%20Studio" class="ztag" rel="tag"&gt;Visual Studio&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-291815626054668764?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/291815626054668764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=291815626054668764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/291815626054668764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/291815626054668764'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/05/editing-visual-studio-2005-project-file.html' title='Editing a Visual Studio 2005 project file'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-8488025274666034600</id><published>2007-05-03T18:12:00.001+03:00</published><updated>2007-05-03T18:20:17.250+03:00</updated><title type='text'>Where's the QA when you need them?</title><content type='html'>&lt;p&gt;Where is the QA when you need them? See the following image for clarification:&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_LpLq8Xaj1cU/Rjn8VWrGcUI/AAAAAAAAAcg/BxCdLAKcDYs/s1600-h/iamservice.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; cursor: pointer;" src="http://3.bp.blogspot.com/_LpLq8Xaj1cU/Rjn8VWrGcUI/AAAAAAAAAcg/BxCdLAKcDYs/s320/iamservice.png" alt="" id="BLOGGER_PHOTO_ID_5060353100121272642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It listens to the name of &lt;strong&gt;ASUS ACPI Cneter&lt;/strong&gt; (sic!) ... Product version 1.0.0.0, File version 0.1.0.24&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It makes me wonder how something like this have slipped through?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-8488025274666034600?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/8488025274666034600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=8488025274666034600' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8488025274666034600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8488025274666034600'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/05/where-qa-when-you-need-them.html' title='Where&amp;#39;s the QA when you need them?'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_LpLq8Xaj1cU/Rjn8VWrGcUI/AAAAAAAAAcg/BxCdLAKcDYs/s72-c/iamservice.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-2011675340945159186</id><published>2007-05-02T00:02:00.001+03:00</published><updated>2007-05-02T00:04:26.852+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Visualizer'/><title type='text'>Visual Studio dependencies</title><content type='html'>&lt;br /&gt;&lt;p&gt;I figured I'd walk through the details on how to find out dependencies of a Visual Studio solution/project. (For those who haven't figured it out yet, this is a description how &lt;a href="http://koti.mbnet.fi/tunedude"&gt;Dependency Visualizer&lt;/a&gt; does it)&lt;/p&gt;&lt;br /&gt;&lt;p&gt;1) For MSBuild compatible project types, it's dead simple, just use the following XPaths, where msbuild stands for the MSBuild schema: &lt;a href="http://schemas.microsoft.com/developer/msbuild/2003"&gt;http://schemas.microsoft.com/developer/msbuild/2003&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Assembly references: &lt;strong&gt;/msbuild:Project/msbuild:ItemGroup/msbuild:Reference/@Include&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Project references: &lt;strong&gt;/msbuild:Project/msbuild:ItemGroup/msbuild:ProjectReference/msbuild:Project/text()&lt;/strong&gt; returns a relative path to the project file.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;2) There are project types that aren't MSBuild compatible (most notably C++ ones), and due to popular demand, I had to add support for these also to Dependency Visualizer.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Assembly references are simple: &lt;a&gt;&lt;strong&gt;/VisualStudioProject/References/AssemblyReference/@AssemblyName&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Project references: Here is where it starts getting nasty..&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a&gt;&lt;strong&gt;/VisualStudioProject/References/ProjectReference/@ReferencedProjectIdentifier&lt;/strong&gt;&lt;/a&gt; gives... you guessed it, a GUID identifying the referenced project. This means we have to parse the freeish text format of the solution file, to find out what project hides behind the GUID. But it gets uglier still, turns out that there's actually dependencies and dependencies. If you go to "Project Dependencies..." window (in VC++) and check a project, then you end up with a reference that's only existing in the solution file like so:&lt;/p&gt;&lt;br /&gt;&lt;pre xml:space="preserve"&gt;&lt;br /&gt;  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ProjectName",&lt;br /&gt;  "ProjectName\ProjectName.vcproj", "{769945FD-50DC-49E4-B93E-54250D7BF541}"&lt;br /&gt;    ProjectSection(ProjectDependencies) = postProject&lt;br /&gt;      {A4583937-88F4-4C1D-B5A9-E711C3951E3A} = {A4583937-88F4-4C1D-B5A9-E711C3951E3A}&lt;br /&gt;    EndProjectSection&lt;br /&gt;  EndProject&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Where the GUID:s fit together like so: the first one is the type, the one on the second row is the project identifier, the thwo on the fourth row is the identifier of the referenced project.&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="zoundry_bw_tags"&gt;&lt;br /&gt;  &lt;!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com --&gt;&lt;br /&gt;  &lt;span class="ztags"&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;a href="http://technorati.com/tag/Dependency%20Visualizer" class="ztag" rel="tag"&gt;Dependency Visualizer&lt;/a&gt;, &lt;a href="http://technorati.com/tag/MSBuild" class="ztag" rel="tag"&gt;MSBuild&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Visual%20Studio" class="ztag" rel="tag"&gt;Visual Studio&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-2011675340945159186?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/2011675340945159186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=2011675340945159186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2011675340945159186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2011675340945159186'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/05/visual-studio-dependencies.html' title='Visual Studio dependencies'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7280136544067057820</id><published>2007-04-24T00:20:00.001+03:00</published><updated>2007-04-24T00:21:35.323+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='UAC'/><title type='text'>Adobe Reader on Vista Ultimate x64</title><content type='html'>&lt;p&gt;After a lot of work and googling I &lt;strong&gt;finally&lt;/strong&gt; managed to get Adobe Reader to install. The funny thing is that Adobe says that version 8 is Vista compatible. I'd like to question that, at least regarding the installer..&lt;/p&gt;&lt;p&gt;Downloaded &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Adobe Reader 8 for Windows Vista&lt;/strong&gt; &lt;p&gt;Started the installer, got the downloaded file warning but not the UAC dialog, then... absolutely nothing happened. &lt;p&gt;Then I tried "Run as administrator", still the same... absolutely nothing happened. &lt;p&gt;Googled around and found indication that running in XP SP2 compatibility mode might help. It did.. &lt;p&gt;&lt;p&gt;But come on Adobe, get your act together and produce an installer that Joe Average can use &lt;strong&gt;without extra fuzzing about!&lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7280136544067057820?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7280136544067057820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7280136544067057820' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7280136544067057820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7280136544067057820'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/04/adobe-reader-on-vista-ultimate-x64.html' title='Adobe Reader on Vista Ultimate x64'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-8715362926765126846</id><published>2007-04-03T23:59:00.001+03:00</published><updated>2007-04-03T23:59:59.835+03:00</updated><title type='text'>Somasegar's WebLog : Listening to your feedback - Expression and MSDN</title><content type='html'>&lt;p&gt;It seems a miracle has happened. Microsoft revaluated their&amp;nbsp;decision about not including&amp;nbsp;Expression&amp;nbsp;Blend in MSDN subscription. Now it seems both Web and Blend (after its release)&amp;nbsp;are included. Whoohoo!&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/somasegar/archive/2007/04/03/listening-to-your-feedback-expression-and-msdn.aspx"&gt;Link to Somasegar's WebLog : Listening to your feedback - Expression and MSDN&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-8715362926765126846?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/8715362926765126846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=8715362926765126846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8715362926765126846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8715362926765126846'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/04/somasegar-weblog-listening-to-your.html' title='Somasegar&amp;#39;s WebLog : Listening to your feedback - Expression and MSDN'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-3376735466334996611</id><published>2007-04-03T20:37:00.001+03:00</published><updated>2007-04-03T20:39:01.992+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++/CLI'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Simple properties</title><content type='html'>&lt;p&gt;What do you prefer?&lt;/p&gt; &lt;p&gt;1)&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:ab65142b-f8b2-4eea-a832-74133cc5d9e7" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; m_foo;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Foo&lt;br /&gt;{&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; m_foo; }&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { m_foo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; value; }&lt;br /&gt;} &lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;2)&lt;br /&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Foo { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; } &lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;3)&lt;br /&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:ec14aea7-b261-45b6-95ad-deeb13b31571" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;br /&gt; property &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Foo;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The first is C#, the second C# 3.0 and the third one is C++/CLI&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-3376735466334996611?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/3376735466334996611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=3376735466334996611' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3376735466334996611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3376735466334996611'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/04/simple-properties.html' title='Simple properties'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-52813517153819391</id><published>2007-04-02T01:36:00.001+03:00</published><updated>2007-04-02T01:37:48.050+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++/CLI'/><title type='text'>Nullable in C++/CLI</title><content type='html'>&lt;p&gt;I was recently working on a C++/CLI project (which I only rarely do, as you'll soon find out)where there was a need to have a method returning a nullable DateTime.&lt;/p&gt; &lt;p&gt;I look up Nullable in the help, I see "ref class Nullable", think that the following will do it.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:0a06ec74-3ce5-49e4-8c05-b63bc9c2f8ee" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Nullable&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;DateTime&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;^&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; GetStuff();&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;I implement the thing and am a happy camper until I try to use it from a C# project. The intellisense says &lt;strong&gt;ValueType GetStuff()&lt;/strong&gt;, WTF !?!&lt;br /&gt;&lt;p&gt;I take a look once again and find out that Nullable&amp;lt;T&amp;gt; is "public value class", so the correct incantation should have been:&lt;/p&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Nullable&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;DateTime&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; GetStuff();&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;oh, and to return a null value you just do:&lt;br /&gt;&lt;br /&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:4d477d06-0e73-4edc-b83f-0be430c006b0" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Nullable&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;DateTime&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;();&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;span style="font-style: italic;"&gt;(Anyone else finds the C# &lt;/span&gt;&lt;strong style="font-style: italic;"&gt;?&lt;/strong&gt;&lt;span style="font-style: italic;"&gt; syntax for nullable types more easily digested?)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-52813517153819391?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/52813517153819391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=52813517153819391' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/52813517153819391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/52813517153819391'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/04/nullable-in-ccli.html' title='Nullable in C++/CLI'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-3683456639406329969</id><published>2007-03-26T01:33:00.001+03:00</published><updated>2007-03-26T01:35:26.315+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Visualizer'/><title type='text'>Dependency Visualizer 1.2.0</title><content type='html'>&lt;p&gt;Just released at &lt;a href="http://koti.mbnet.fi/tunedude"&gt;http://koti.mbnet.fi/tunedude&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Whats new:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Optionally hide .NET 2.0 references&lt;/li&gt; &lt;li&gt;Optionally hide .NET 3.0 references&lt;/li&gt; &lt;li&gt;Generate svg and/or png&lt;/li&gt; &lt;li&gt;Configurable (the above mentioned items)&lt;/li&gt; &lt;li&gt;Support for vcproj:s&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-3683456639406329969?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/3683456639406329969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=3683456639406329969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3683456639406329969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3683456639406329969'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/03/dependency-visualizer-120.html' title='Dependency Visualizer 1.2.0'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-2077865083147858671</id><published>2007-03-22T19:44:00.000+02:00</published><updated>2007-03-22T19:53:47.698+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>utmanad..</title><content type='html'>Jag har tydligen också lyckats bli utmanad &lt;a href="http://bloggen.fi/trio"&gt;(av trion)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Här är några lagom intressanta påståenden i ingen speciell ordningsföljd:&lt;br /&gt;&lt;br /&gt;1. Jag hatar allt som liknar kedjebrev (därmed tänker jag inte heller utmana någon fler..)&lt;br /&gt;&lt;br /&gt;2. Har nästan lyckats kapa benet av mej medelst motorsåg..&lt;br /&gt;&lt;br /&gt;3. Har deltagit i skönhetstävling.&lt;br /&gt;&lt;br /&gt;4. Har blivit halvt korsfäst (ja eller i alla fall blivit spikad i ena handen...)&lt;br /&gt;&lt;br /&gt;5. Har diplom i komjölkning&lt;br /&gt;&lt;br /&gt;6. Kanin är gott...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-2077865083147858671?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/2077865083147858671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=2077865083147858671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2077865083147858671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2077865083147858671'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/03/utmanad.html' title='utmanad..'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1412380692319354749</id><published>2007-02-20T22:36:00.001+02:00</published><updated>2007-02-20T22:39:40.225+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++/CLI'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>const (in C++/CLI) considered harmful</title><content type='html'>&lt;p&gt;Today I found the following "gotcha" in combining C++/CLI and C#.&lt;br /&gt;Create a C++/CLI dll containing something along the lines of:&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:03a66841-9298-48a1-9eb9-ae8ec69c8cb9" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;ref&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Foo&lt;br /&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;const&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; BAR &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;42&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;};&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;Use that from C#, maybe like so:&lt;br /&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:5dc298b9-5b07-4d63-9aa1-88ca3bf0ec3f" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; temp &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Foo.BAR;&lt;br /&gt;Foo.BAR &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;br /&gt;MessageBox.Show(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.Format(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;The answer is: {0} ...or {1}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;  temp, Foo.BAR), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;WTF!?!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;Wait, that should not be possible! We just said that &lt;strong&gt;BAR&lt;/strong&gt; was const in the C++/CLI code didn't we?&lt;br /&gt;&lt;p&gt;The problem is that it is possible (and gives the following screenshot):&lt;br /&gt;&lt;/p&gt;&lt;pre style="background-color: White;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_LpLq8Xaj1cU/RdtcWz3grsI/AAAAAAAAAcI/Kew1PmKYuXI/s1600-h/non-const-const.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_LpLq8Xaj1cU/RdtcWz3grsI/AAAAAAAAAcI/Kew1PmKYuXI/s320/non-const-const.jpg" alt="" id="BLOGGER_PHOTO_ID_5033718555466575554" border="0" /&gt;&lt;/a&gt;&lt;/pre&gt;&lt;p&gt;Digging deeper reveals that  C++/CLI const turns into an ordinary field with an &lt;strong&gt;optional modifier&lt;/strong&gt; IsConst that languages are free to ignore, (which e.g. C# does).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If you in fact want a "constant" constant (which is probably why you wrote const in the first place?), then you will need to use &lt;strong&gt;literal&lt;/strong&gt; in C++/CLI to get the same result as a C# &lt;strong&gt;const.&lt;/strong&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1412380692319354749?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1412380692319354749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1412380692319354749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1412380692319354749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1412380692319354749'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/02/const-in-ccli-considered-harmful.html' title='const (in C++/CLI) considered harmful'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_LpLq8Xaj1cU/RdtcWz3grsI/AAAAAAAAAcI/Kew1PmKYuXI/s72-c/non-const-const.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-736627154615930226</id><published>2007-02-15T22:50:00.001+02:00</published><updated>2007-03-26T01:35:26.316+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Visualizer'/><title type='text'>DependencyVisualizer</title><content type='html'>&lt;p&gt;The second version of&amp;nbsp;&lt;a href="http://koti.mbnet.fi/tunedude"&gt;Dependency Visualizer&lt;/a&gt;&amp;nbsp;was just uploaded. This time it might actually work :) And in the case it does not, the possibilities to get traces for me should be infinitely better than the first version.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-736627154615930226?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/736627154615930226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=736627154615930226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/736627154615930226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/736627154615930226'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/02/dependencyvisualizer.html' title='DependencyVisualizer'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1513159617922968088</id><published>2007-02-14T00:22:00.001+02:00</published><updated>2007-03-26T01:35:26.317+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dependency Visualizer'/><title type='text'>Dependency Visualizer released</title><content type='html'>&lt;p&gt;I just put up the first public version of the &lt;a href="http://koti.mbnet.fi/tunedude"&gt;Dependency Visualizer&lt;/a&gt;. You might want to try it out..&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1513159617922968088?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1513159617922968088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1513159617922968088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1513159617922968088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1513159617922968088'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/02/dependency-visualizer-released.html' title='Dependency Visualizer released'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-127517892937751527</id><published>2007-02-13T22:28:00.001+02:00</published><updated>2007-02-13T22:28:56.086+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><title type='text'>Extend right-click menu in Explorer in WiX installer</title><content type='html'>&lt;p&gt;I just had the need to make an installer that created a right-click menu item for Visual Studio solution files (.sln)&lt;/p&gt; &lt;p&gt;The easiest way to accomplish this would have been to use the WiX built in support for registering extensions:&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:11061850-6947-4936-8dad-2aab4f6d76d5" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Extension &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ContentType&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="text\plain"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="sln"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Verb &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Visualize"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Command&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Visualize dependencies"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;           TargetFile&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="DependencyVisualizerExe"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;           Argument&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;='"%1"'/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;/Extension&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;However, I soon found out that this was a Bad Idea, in the sense that then my software took over as the default handler for &lt;strong&gt;.sln&lt;/strong&gt; files. Not exactly what I wanted...&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Turns out that I needed to manually install the registry keys/values in the appropriate place to get it to work:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:5b3e6364-4447-4b0a-bddd-34364066f040" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Component &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="DependencyVisualizerComponent"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Guid&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="PUT-GUID-HERE"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;File &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Name&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="DependencyVisualizer.exe"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Id&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="DependencyVisualizerExe"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;         Source&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="!(wix.SourceDir)DependencyVisualizer.exe"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;RegistryKey &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Action&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="createAndRemoveOnUninstall"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Root&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="HKCR"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;                      Key&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="VisualStudio.Launcher.sln\Shell\Visualize"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;RegistryValue &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Action&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="write"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Visualize Dependencies"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="string"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;RegistryKey &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Action&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="createAndRemoveOnUninstall"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Key&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Command"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;     &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;RegistryValue &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Action&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="write"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Type&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="string"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;       Value&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="&amp;amp;quot;[#DependencyVisualizerExe]&amp;amp;quot; &amp;quot;%1&amp;quot;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;RegistryKey&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;RegistryKey&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Component&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Oh, and the tool I'm working on is a tool for visualizing inter-project dependencies...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-127517892937751527?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/127517892937751527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=127517892937751527' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/127517892937751527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/127517892937751527'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/02/extend-right-click-menu-in-explorer-in.html' title='Extend right-click menu in Explorer in WiX installer'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-182785947286476114</id><published>2007-01-31T20:25:00.001+02:00</published><updated>2007-01-31T20:29:54.543+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>BackgroundWorker and exceptions</title><content type='html'>&lt;p&gt;Got a bit confused at work today when a piece of software seemingly halted in a place where it should not have been possible.&lt;/p&gt; &lt;p&gt;After looking at the code for a while I found something like the following:&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:7406a8f2-a692-44ba-94cb-e38b4d102d77" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            BackgroundWorker bgw &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; BackgroundWorker();&lt;br /&gt;           bgw.DoWork &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DoWorkEventHandler(bgw_DoWork);&lt;br /&gt;           bgw.RunWorkerAsync();           &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;where &lt;strong&gt;bgw_DoWork&lt;/strong&gt; was (basically) implemented thusly:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:ba04ab17-796e-4ac6-867b-b8fd3e58ff0a" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; bgw_DoWork(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; sender, DoWorkEventArgs e)&lt;br /&gt;       {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; ...&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;throw&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Exception(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;things went bad&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;       }&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;If you try it out (outside the debugger) you'll notice that the &lt;strong&gt;exception is silently swallowed !?!&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;The moral of the story:&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;If you use Background worker, either implement a catch all handler within the DoWork method or, hook the &lt;strong&gt;RunWorkerCompleted&lt;/strong&gt; event and check RunWorkerCompletedEventArgs.Error for non-null value.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-182785947286476114?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/182785947286476114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=182785947286476114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/182785947286476114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/182785947286476114'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/01/backgroundworker-and-exceptions.html' title='BackgroundWorker and exceptions'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5887332028491501302</id><published>2007-01-30T19:53:00.001+02:00</published><updated>2007-01-31T20:30:24.140+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Browsing old books</title><content type='html'>&lt;p&gt;Doesn't sound like much fun does it? Well, consider that the books in questions were hand written by Leonardo da Vinci or that one of the books were Alice under ground or something other like that, then it seems much more interesting. The &lt;a href="http://www.bl.uk/"&gt;British library&lt;/a&gt; has done just that, published a few selected books in a WPF showcase application that feels &lt;strong&gt;close to&lt;/strong&gt; reading a real book. &lt;a href="http://ttpdownload.bl.uk/browserapp.xbap" target="_blank"&gt;See for yourself&lt;/a&gt;!&lt;/p&gt; &lt;p&gt;Prerequisites:  .NET 3.0, Internet Explorer and a reasonably modern computer.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:a1e7c2b3-1a88-4826-bb76-33b430129965" contenteditable="false" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/WPF" rel="tag"&gt;WPF&lt;/a&gt;, &lt;a href="http://technorati.com/tags/.NET%203.0" rel="tag"&gt;.NET 3.0&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5887332028491501302?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5887332028491501302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5887332028491501302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5887332028491501302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5887332028491501302'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/01/browsing-old-books.html' title='Browsing old books'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5963110412442422365</id><published>2007-01-06T20:09:00.001+02:00</published><updated>2007-01-06T20:09:20.345+02:00</updated><title type='text'>Anti-commercial for two products..</title><content type='html'>&lt;p&gt;I have two products that I'm annoyed with from time to time.&lt;/p&gt; &lt;p&gt;1) Samsung CLP-500&lt;/p&gt; &lt;p&gt;It tells me that the waste toner tank is full (now and then) and that I need to replace it. However I can clearly see that it is nowhere near full. The problem seems to be with stupid design, there is an optical sensor &lt;strong&gt;right under&lt;/strong&gt; one of the inlets that detects if it can see through the waste toner tank (made of clear plastic), to make matters worse, it seems that a tiny toner particle in the sensors way and the tank "is full". Samsungs FAQ entry for the error message is also somewhat funny.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;"Waste Toner Tank Full/Not Install" is displayed. &lt;p&gt;First,&amp;nbsp;replace&amp;nbsp;the&amp;nbsp;waste&amp;nbsp;toner&amp;nbsp;tank.&amp;nbsp;&amp;nbsp;&lt;br&gt;If&amp;nbsp;the&amp;nbsp;same&amp;nbsp;message&amp;nbsp;is&amp;nbsp;displayed&amp;nbsp;continually&amp;nbsp;after&amp;nbsp;replaced.&lt;br&gt;-&amp;nbsp;Check&amp;nbsp;whether&amp;nbsp;that&amp;nbsp;replaced&amp;nbsp;waste&amp;nbsp;toner&amp;nbsp;tank&amp;nbsp;is&amp;nbsp;the&amp;nbsp;new.&lt;br&gt;-&amp;nbsp;If&amp;nbsp;it&amp;nbsp;is&amp;nbsp;the&amp;nbsp;new,&amp;nbsp;the&amp;nbsp;printer&amp;nbsp;may&amp;nbsp;require&amp;nbsp;repair.&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;2) Logitech MX-1000 &lt;ul&gt; &lt;li&gt;Cursor occasionally jumping all over the place&lt;/li&gt; &lt;li&gt;Buttons behave if they are pressed&lt;/li&gt; &lt;li&gt;Tilt wheel get stuck tilted&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;..need I say more?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5963110412442422365?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5963110412442422365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5963110412442422365' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5963110412442422365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5963110412442422365'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/01/anti-commercial-for-two-products.html' title='Anti-commercial for two products..'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5186326806209426722</id><published>2007-01-02T01:10:00.000+02:00</published><updated>2007-01-02T01:15:26.682+02:00</updated><title type='text'>Happy New Year, and a late christmas present..</title><content type='html'>The break is over and tomorrow back to work again. Meanwhile, it seems that I've been a awarded with a 1-year MSDN subscription with all the bells and whistles thanks to my activity at &lt;a href="http://www.pellesoft.se"&gt;pellesoft.se&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; Yay!&lt;br /&gt;&lt;br /&gt;(The announcement is &lt;a href="http://www.pellesoft.se/communicate/forum/view.aspx?msgid=237451&amp;forumid=8&amp;amp;sum=1"&gt;here&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5186326806209426722?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5186326806209426722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5186326806209426722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5186326806209426722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5186326806209426722'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2007/01/happy-new-year-and-late-christmas.html' title='Happy New Year, and a late christmas present..'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5752546964933889067</id><published>2006-12-15T18:09:00.001+02:00</published><updated>2006-12-15T18:09:13.752+02:00</updated><title type='text'>Google Santa Tracker and Toy Hunt</title><content type='html'>&lt;p&gt;It seems that you can go threasure hunting with Google Earth. You get a clue every day where to find a 'hidden' present, or maybe it's just a package that fell off the sledge in such a way that it opened. Well anyway, just go hunting and maybe learn some geography on the way.&lt;/p&gt; &lt;p&gt;&lt;a href="http://earth.google.com/santa/"&gt;Link to Google Santa Tracker and Toy Hunt&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5752546964933889067?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5752546964933889067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5752546964933889067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5752546964933889067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5752546964933889067'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/12/google-santa-tracker-and-toy-hunt.html' title='Google Santa Tracker and Toy Hunt'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-664301244902644012</id><published>2006-11-28T22:18:00.001+02:00</published><updated>2007-01-31T20:31:36.438+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>.NET 3.0 artikelserie fortsättning</title><content type='html'>&lt;p&gt;Del 4 och 5 är skrivna på &lt;a href="http://www.pellesoft.se/"&gt;pellesoft&lt;/a&gt; och kommer att släppas inom kort. Denna gång handlar det om WPF.&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:435c7f6f-9235-4224-b358-0d5908d3410b" contenteditable="false" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/.NET%203.0" rel="tag"&gt;.NET 3.0&lt;/a&gt;, &lt;a href="http://technorati.com/tags/WPF" rel="tag"&gt;WPF&lt;/a&gt;, &lt;a href="http://technorati.com/tags/WCF" rel="tag"&gt;WCF&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-664301244902644012?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/664301244902644012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=664301244902644012' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/664301244902644012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/664301244902644012'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/11/net-30-artikelserie-fortsttning.html' title='.NET 3.0 artikelserie fortsättning'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-2344851776466584788</id><published>2006-11-23T19:32:00.001+02:00</published><updated>2007-01-10T18:51:33.912+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Implicit UseSynchronizationContext==true may lead to deadlocks ...</title><content type='html'>&lt;p&gt;Today I found a little &lt;a href="http://blogs.msdn.com/mahjayar/archive/2006/11/07/winfx-usesynchronizationcontext-usage.aspx"&gt;gem&lt;/a&gt; on Mahjayar's blog on the use of CallbackBehavior and UseSynchronizationContext. Basically, if you have a duplex contract you might want to switch off UseSynchronization context, particularly if the client is WinForms (or WPF), or you might end up with deadlocks.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:de8db90d-e35a-464f-8a6d-614a234ec896" contenteditable="false" style="margin: 0px; padding: 0px; display: inline;"&gt;&lt;span class="post-labels"&gt;Labels: &lt;a href="http://mostlytech.blogspot.com/search/label/WCF" rel="tag"&gt;WCF&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:4697aef3-6a94-4311-b5d5-6ce2d2204d5c" contenteditable="false" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/WCF" rel="tag"&gt;WCF&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-2344851776466584788?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/2344851776466584788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=2344851776466584788' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2344851776466584788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/2344851776466584788'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/11/implicit-usesynchronizationcontexttrue.html' title='Implicit UseSynchronizationContext==true may lead to deadlocks ...'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-242614740146095372</id><published>2006-11-23T18:56:00.001+02:00</published><updated>2006-11-23T19:44:48.029+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WLW'/><title type='text'>Add blogger Labels to Windows Live Writer</title><content type='html'>&lt;p&gt;It seems that the "Insert Tags..." thing in Windows Live Writer is customizable enough that it is possible to add support for blogger labels by doing the following:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Insert tags ... -&amp;gt; Choose (Customize Providers...) in dropdown list  &lt;/li&gt;&lt;li&gt;Add...  &lt;/li&gt;&lt;li&gt;Set provider name appropriately so that you know it e.g. blogger  &lt;/li&gt;&lt;li&gt;Set template to:  &lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:f7a22d07-0051-4884-8cba-6a176aba52c5" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none; width: 520px;"&gt;&lt;pre style="background-color: White; white-space: -moz-pre-wrap;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;a &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;href&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="http://obviously-your-blog-name.blogspot.com/search/label/{tag-encoded}"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;rel&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="tag"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{tag}&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;a&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Set tag separator to ", " (without the quotes)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Set htm caption to "&amp;lt;span class="post-labels"&amp;gt;Labels: {tag-group}&amp;lt;/span&amp;gt;" (without the quotes)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;If you do that, and add tags using that provider, the tags should work exactly as when blogging via web-ui.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;EDIT: it seems that the labels do not show up on the edit posts page in the web ui. I wonder if that matters?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;EDIT2: it looks correct but does not work... (&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:6558b747-4361-43a0-a9b8-80d7bafa5531" contenteditable="false" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/WLW" rel="tag"&gt;WLW&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-242614740146095372?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/242614740146095372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=242614740146095372' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/242614740146095372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/242614740146095372'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/11/add-blogger-labels-to-windows-live.html' title='Add blogger Labels to Windows Live Writer'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5640526784134167518</id><published>2006-11-22T20:32:00.001+02:00</published><updated>2007-01-10T18:51:11.714+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>HOWTO: Read attributes from an enumeration member</title><content type='html'>&lt;p&gt;Today I needed to read custom attributes from members of an enumeration type. As the found solution did not strike me as immediately obvious, I'm posting here for future reference:&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:22bb4475-dc74-4bd6-9c59-3aa0365aecb2" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            Thing foo &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Thing.Bar;&lt;br /&gt;           FieldInfo field &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; foo.GetType().GetField(foo.ToString());&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[] attrs &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; field.GetCustomAttributes(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Description), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;false&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;where Thing is an enumeration, defined something like:&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:f00821a1-266f-4447-a320-4d89d4ebfaca" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;enum&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Thing {&lt;br /&gt;       [Description(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Foo thing&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)]&lt;br /&gt;       Foo,&lt;br /&gt;       Bar,&lt;br /&gt;       [Description(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Baz thing&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)]&lt;br /&gt;       Baz&lt;br /&gt;   }&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:da37c738-405e-4166-9121-0e601580c1ed" contenteditable="false" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/.NET" rel="tag"&gt;.NET&lt;/a&gt;, &lt;a href="http://technorati.com/tags/C#" rel="tag"&gt;C#&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5640526784134167518?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5640526784134167518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5640526784134167518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5640526784134167518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5640526784134167518'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/11/howto-read-attributes-from-enumeration.html' title='HOWTO: Read attributes from an enumeration member'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5784301695192704005</id><published>2006-11-21T22:31:00.001+02:00</published><updated>2007-01-31T20:31:01.640+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>.NET 3.0 artikelserie på gång</title><content type='html'>&lt;p&gt;Har börjat skriva en artikelserie om .NET 3.0 på &lt;a href="http://www.pellesoft.se/"&gt;pellesoft&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Del 1, 2, 3 redan klara och handlar främst om WCF. Nästa i tur är ytskrap av WPF. &lt;a href="http://www.pellesoft.se/area/articles/article.aspx?artid=982"&gt;Del 1&lt;/a&gt; släpptes idag. &lt;a href="http://www.pellesoft.se/area/articles/article.aspx?artid=984"&gt;Del 2&lt;/a&gt; kommer i morgon och &lt;a href="http://www.pellesoft.se/area/articles/article.aspx?artid=986"&gt;del 3&lt;/a&gt; i övermorgon.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:6ba6892f-76d3-4905-9f7d-154334ca94d5" contenteditable="false" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/.NET%203.0" rel="tag"&gt;.NET 3.0&lt;/a&gt;, &lt;a href="http://technorati.com/tags/WCF" rel="tag"&gt;WCF&lt;/a&gt;, &lt;a href="http://technorati.com/tags/WPF" rel="tag"&gt;WPF&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5784301695192704005?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5784301695192704005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5784301695192704005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5784301695192704005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5784301695192704005'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/11/net-30-artikelserie-p-gng.html' title='.NET 3.0 artikelserie på gång'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7888638635159005278</id><published>2006-11-17T16:56:00.003+02:00</published><updated>2006-11-17T16:56:58.738+02:00</updated><title type='text'>Php and security ...</title><content type='html'>&lt;p&gt;I recently had the "opportunity" to look for security problems in an inherited &lt;a href="http://www.php.net" target="_blank"&gt;php&lt;/a&gt; application.&amp;nbsp;I found the following seemingly innocent line of code:&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:029a2820-1a15-4cd2-b43a-2a9d88f114fc" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:Silver;"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #0000FF; "&gt;require&lt;/span&gt;&lt;span style="color: #000000; "&gt;(&lt;/span&gt;&lt;span style="color: #800080; "&gt;$_GET&lt;/span&gt;&lt;span style="color: #000000; "&gt;[&lt;/span&gt;&lt;span style="color: #000000; "&gt;'&lt;/span&gt;&lt;span style="color: #000000; "&gt;menu&lt;/span&gt;&lt;span style="color: #000000; "&gt;'&lt;/span&gt;&lt;span style="color: #000000; "&gt;]&lt;/span&gt;&lt;span style="color: #000000; "&gt;.&lt;/span&gt;&lt;span style="color: #000000; "&gt;'&lt;/span&gt;&lt;span style="color: #000000; "&gt;.inc&lt;/span&gt;&lt;span style="color: #000000; "&gt;'&lt;/span&gt;&lt;span style="color: #000000; "&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Well let's think about it a little..&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Imagine there is somewhere one or more users that are not all that friendly ... &lt;br /&gt;&lt;li&gt;Imagine &lt;strong&gt;$_GET['menu']&lt;/strong&gt; is something that comes from a user ... &lt;br /&gt;&lt;li&gt;Imagine that php treats the &lt;strong&gt;include()&lt;/strong&gt;:d/&lt;strong&gt;require()&lt;/strong&gt;:d code as php and not html &lt;br /&gt;&lt;li&gt;Imagine that the &lt;strong&gt;include()&lt;/strong&gt;:d/&lt;strong&gt;require()&lt;/strong&gt;:d file would not have to exist on the same server &lt;br /&gt;&lt;li&gt;Imagine that there somewhere on the Internet exists text/plain file containing php code&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;If that was true, then we would have a $h*tload of problems, right? Fortunately that's not true... ..right?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;..oh, wait.. &lt;strong&gt;*all*&lt;/strong&gt; of those &lt;strong&gt;are true&lt;/strong&gt;. Oops...&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:9c122055-2b64-4045-b61a-41ae7ed0b766" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/php" rel="tag"&gt;php&lt;/a&gt;, &lt;a href="http://technorati.com/tags/security" rel="tag"&gt;security&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7888638635159005278?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7888638635159005278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7888638635159005278' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7888638635159005278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7888638635159005278'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/11/php-and-security.html' title='Php and security ...'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5166185617405708198</id><published>2006-11-07T22:42:00.000+02:00</published><updated>2006-11-07T22:46:32.835+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>.NET 3.0 RTM</title><content type='html'>It seems the .NET 3.0 platform has officially been released:&lt;br /&gt;&lt;a href="http://www.microsoft.com/presspass/press/2006/nov06/11-06MSVisualStudioPR.mspx"&gt;Press release&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=10cc340b-f857-4a14-83f5-25634c3bf043"&gt;Runtime&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/windowsvista/support/relnotes/netfx3/default.aspx"&gt;Readme&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=F54F5537-CC86-4BF5-AE44-F5A1E805680D"&gt;Visual Studio 2005 extensions for .NET Framework 3.0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&amp;displaylang=en"&gt;.NET 3.0 SDK&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5166185617405708198?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5166185617405708198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5166185617405708198' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5166185617405708198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5166185617405708198'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/11/net-30-rtm.html' title='.NET 3.0 RTM'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-6115551330017330902</id><published>2006-10-18T23:35:00.000+03:00</published><updated>2006-10-18T23:43:41.787+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiX'/><title type='text'>List of Wix3 'autodetected' products</title><content type='html'>&lt;a href="http://blog.dotnetwiki.org"&gt;Jonathan de Halleux&lt;/a&gt; &lt;a href="http://blogs.msdn.com/robmen/archive/2006/10/17/wix-v3-syntax-for-detecting-the-clr.aspx#837728"&gt;asked&lt;/a&gt; for a list of 'autodetected' products in Wix3.&lt;br /&gt;&lt;br /&gt;Looking for something to do, I went through the sources for 3.0.2211.0 (src\ext\*\wixlib\*.wxs) for relevant properties.&lt;br /&gt;&lt;br /&gt;NetFxExtension:&lt;br /&gt; - NETFRAMEWORK10&lt;br /&gt; - NETFRAMEWORK11&lt;br /&gt; - NETFRAMEWORK20&lt;br /&gt; - NETFRAMEWORK30&lt;br /&gt; - NETFRAMEWORK11SDKDIR&lt;br /&gt; - NETFRAMEWORK20SDKDIR&lt;br /&gt;&lt;br /&gt;IisExtension:&lt;br /&gt; - IISMAJORVERSION&lt;br /&gt; - IISMINORVERSION&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-6115551330017330902?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/6115551330017330902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=6115551330017330902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6115551330017330902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6115551330017330902'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/10/list-of-wix3-autodetected-products.html' title='List of Wix3 &apos;autodetected&apos; products'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-9082053009141555298</id><published>2006-10-02T20:32:00.001+03:00</published><updated>2006-10-02T20:32:01.827+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><title type='text'>&lt;Blink&gt; on steroids...</title><content type='html'>&lt;p&gt;One of the long-standing jokes at the office is about using the much hated &lt;a href="http://en.wikipedia.org/wiki/Blink_tag"&gt;&amp;lt;Blink&amp;gt;&lt;/a&gt; tag in XAML user interfaces. (The other one being about mapping the UI onto the inside of a sphere..)&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; This is NOT in ANY WAY suggested for any use WHATSOEVER. We have already seen way too many blinking webpages, thank you very much. And the code is "proof-of-concept" quality..&lt;/p&gt; &lt;p&gt;So basically, I wanted to do a a component that I can use in XAML, making it's content blink. And just for the fun of it, I wanted the on and off durations tunable, and the same goes for the durations of the fade in and fade out between those two extremes.&lt;/p&gt; &lt;p&gt;So here goes nothing...&lt;/p&gt;&lt;p&gt;First a little test case: &lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:500d51a7-48c4-4b47-893d-3e8685cbd809" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Window &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;x:Class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Blink.Window1"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;   xmlns&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;   xmlns:x&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;   xmlns:src&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="clr-namespace:BlinkTest"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Title&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Blink"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Height&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="300"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Width&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="450"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;StackPanel &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Orientation&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Vertical"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Use default blinking settings &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;--&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;src:Blink&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;TextBlock &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Padding&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="20"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Margin&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="20"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Background&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Pink"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Hello World&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;TextBlock&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;src:Blink&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Explicitely specify blinking settings &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;--&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;src:Blink &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;OnDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="1"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; OffDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="1"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; FadeInDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="0"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; FadeOutDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="0"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;StackPanel &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Orientation&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="Horizontal"&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Margin&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;="50"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Label&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Some nice text about the button&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Label&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Button&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Click Me!&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Button&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;StackPanel&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;src:Blink&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;StackPanel&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Window&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;And then the code for the Blink class&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The using statements&lt;/p&gt;&lt;br /&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:08cea44f-f5e7-4cf8-85b0-3beb66382098" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Windows;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Windows.Controls;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Windows.Markup;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Windows.Media;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Windows.Media.Animation;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;We are inheriting System.Windows.Controls.Control so we have to do some cruft related to layout&lt;/p&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:7b5b0d07-d300-4826-951c-e031a7b482f2" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;protected&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;override&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; VisualChildrenCount {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;?&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; : &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;protected&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;override&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Visual GetVisualChild(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; index) {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (index &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;||&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;throw&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ArgumentException(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;index&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;protected&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;override&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Size MeasureOverride(Size constraint) {&lt;br /&gt;           Size sizeDesired &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Size(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (Child &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;br /&gt;               Child.Measure(constraint);&lt;br /&gt;           }&lt;br /&gt;           sizeDesired.Width &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child.DesiredSize.Width;&lt;br /&gt;           sizeDesired.Height &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child.DesiredSize.Height;&lt;br /&gt;&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; sizeDesired;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;protected&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;override&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Size ArrangeOverride(Size arrangeBounds) {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (Child &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;br /&gt;               Rect rect &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Rect(&lt;br /&gt;                   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Point((arrangeBounds.Width &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child.DesiredSize.Width) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                               (arrangeBounds.Height &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child.DesiredSize.Height) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;),&lt;br /&gt;                               Child.DesiredSize);&lt;br /&gt;               Child.Arrange(rect);&lt;br /&gt;           }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; arrangeBounds;&lt;br /&gt;       }&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;And for the animation to work we need a number of dependency properties for the durations&lt;/p&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now, all that is left is just the blinking animation. An obvious choice for&lt;br /&gt;&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:29cc9724-adf6-477d-b7f3-4a5ad8cb21ed" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Using a DependencyProperty as the backing store for OffDuration.  This enables animation, styling, binding, etc...&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;readonly&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty OffDurationProperty;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Using a DependencyProperty as the backing store for OnDuration.  This enables animation, styling, binding, etc...&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;readonly&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty OnDurationProperty;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Using a DependencyProperty as the backing store for RiseDuration.  This enables animation, styling, binding, etc...&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;readonly&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty FadeInDurationProperty;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Using a DependencyProperty as the backing store for DeclineDuration.  This enables animation, styling, binding, etc...&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;readonly&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty FadeOutDurationProperty;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; OnDuration {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)GetValue(OnDurationProperty); }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { SetValue(OnDurationProperty, value); }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; OffDuration {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)GetValue(OffDurationProperty); }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { SetValue(OffDurationProperty, value); }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; FadeInDuration {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)GetValue(FadeInDurationProperty); }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { SetValue(FadeInDurationProperty, value); }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; FadeOutDuration {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)GetValue(FadeOutDurationProperty); }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { SetValue(FadeOutDurationProperty, value); }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Blink() {&lt;br /&gt;               &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; register dependency properties &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                OffDurationProperty &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty.Register(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;OffDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Blink), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; UIPropertyMetadata(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1.0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;               OnDurationProperty &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty.Register(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;OnDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Blink), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; UIPropertyMetadata(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1.0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;               FadeInDurationProperty &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty.Register(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;FadeInDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Blink), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; UIPropertyMetadata(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0.2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;               FadeOutDurationProperty &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty.Register(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;FadeOutDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Blink), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; UIPropertyMetadata(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0.5&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;       }&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;thing to animate is &lt;strong&gt;UIElement.OpacityProperty&lt;/strong&gt;. So that's what I'm using, and to avoid a lot of fuzz with StoryBoards and stuff I set up the animation with the help of a &lt;strong&gt;DoubleAnimationUsingKeyFrames.&lt;/strong&gt; &lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:3367aa7f-806d-48cf-83ab-ff7283e8e7b6" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                    &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; setup the animation&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                    DoubleAnimationUsingKeyFrames animation &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DoubleAnimationUsingKeyFrames();&lt;br /&gt;                   animation.RepeatBehavior &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; RepeatBehavior.Forever;&lt;br /&gt;&lt;br /&gt;                   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; currentSeconds &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; keep track of cumulated time&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                    LinearDoubleKeyFrame start &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LinearDoubleKeyFrame(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                       KeyTime.FromTimeSpan(TimeSpan.FromSeconds(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)));&lt;br /&gt;                   animation.KeyFrames.Add(start);&lt;br /&gt;&lt;br /&gt;                   currentSeconds &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; FadeInDuration;&lt;br /&gt;                   LinearDoubleKeyFrame fadeInFrame &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LinearDoubleKeyFrame(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                       KeyTime.FromTimeSpan(TimeSpan.FromSeconds(currentSeconds)));&lt;br /&gt;                   animation.KeyFrames.Add(fadeInFrame);&lt;br /&gt;&lt;br /&gt;                   currentSeconds &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; OnDuration;&lt;br /&gt;                   LinearDoubleKeyFrame onFrame &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LinearDoubleKeyFrame(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                       KeyTime.FromTimeSpan(TimeSpan.FromSeconds(currentSeconds)));&lt;br /&gt;                   animation.KeyFrames.Add(onFrame);&lt;br /&gt;&lt;br /&gt;                   currentSeconds &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; FadeOutDuration;&lt;br /&gt;                   LinearDoubleKeyFrame fadeOutFrame &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LinearDoubleKeyFrame(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                       KeyTime.FromTimeSpan(TimeSpan.FromSeconds(currentSeconds)));&lt;br /&gt;                   animation.KeyFrames.Add(fadeOutFrame);&lt;br /&gt;&lt;br /&gt;                   currentSeconds &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; OffDuration;&lt;br /&gt;                   LinearDoubleKeyFrame offFrame &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LinearDoubleKeyFrame(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                       KeyTime.FromTimeSpan(TimeSpan.FromSeconds(currentSeconds)));&lt;br /&gt;                   animation.KeyFrames.Add(offFrame);&lt;br /&gt;&lt;br /&gt;                   Child.BeginAnimation(UIElement.OpacityProperty, animation);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;And here is the whole Blink.cs in its entirety once again:&lt;/p&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:e3644043-2446-4629-977f-82499f957190" contenteditable="false" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;&lt;pre style="background-color: White;"&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Windows;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Windows.Controls;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Windows.Markup;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Windows.Media;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; System.Windows.Media.Animation;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;namespace&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; BlinkTest {&lt;br /&gt;   [ContentProperty(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Child&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)]&lt;br /&gt;   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Blink : Control {&lt;br /&gt;       UIElement m_child;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; UIElement Child {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; m_child; }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; {&lt;br /&gt;               &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (m_child &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;br /&gt;                   RemoveVisualChild(m_child);&lt;br /&gt;                   RemoveLogicalChild(m_child);&lt;br /&gt;               }&lt;br /&gt;               &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ((m_child &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; value) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;br /&gt;                   AddVisualChild(m_child);&lt;br /&gt;                   AddLogicalChild(m_child);&lt;br /&gt;&lt;br /&gt;                   &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; setup the animation&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                    DoubleAnimationUsingKeyFrames animation &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DoubleAnimationUsingKeyFrames();&lt;br /&gt;                   animation.RepeatBehavior &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; RepeatBehavior.Forever;&lt;br /&gt;&lt;br /&gt;                   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; currentSeconds &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; keep track of cumulated time&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                    LinearDoubleKeyFrame start &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LinearDoubleKeyFrame(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                       KeyTime.FromTimeSpan(TimeSpan.FromSeconds(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)));&lt;br /&gt;                   animation.KeyFrames.Add(start);&lt;br /&gt;&lt;br /&gt;                   currentSeconds &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; FadeInDuration;&lt;br /&gt;                   LinearDoubleKeyFrame fadeInFrame &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LinearDoubleKeyFrame(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                       KeyTime.FromTimeSpan(TimeSpan.FromSeconds(currentSeconds)));&lt;br /&gt;                   animation.KeyFrames.Add(fadeInFrame);&lt;br /&gt;&lt;br /&gt;                   currentSeconds &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; OnDuration;&lt;br /&gt;                   LinearDoubleKeyFrame onFrame &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LinearDoubleKeyFrame(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                       KeyTime.FromTimeSpan(TimeSpan.FromSeconds(currentSeconds)));&lt;br /&gt;                   animation.KeyFrames.Add(onFrame);&lt;br /&gt;&lt;br /&gt;                   currentSeconds &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; FadeOutDuration;&lt;br /&gt;                   LinearDoubleKeyFrame fadeOutFrame &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LinearDoubleKeyFrame(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                       KeyTime.FromTimeSpan(TimeSpan.FromSeconds(currentSeconds)));&lt;br /&gt;                   animation.KeyFrames.Add(fadeOutFrame);&lt;br /&gt;&lt;br /&gt;                   currentSeconds &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; OffDuration;&lt;br /&gt;                   LinearDoubleKeyFrame offFrame &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; LinearDoubleKeyFrame(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                       KeyTime.FromTimeSpan(TimeSpan.FromSeconds(currentSeconds)));&lt;br /&gt;                   animation.KeyFrames.Add(offFrame);&lt;br /&gt;&lt;br /&gt;                   Child.BeginAnimation(UIElement.OpacityProperty, animation);&lt;br /&gt;               }&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;protected&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;override&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; VisualChildrenCount {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;?&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; : &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;protected&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;override&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Visual GetVisualChild(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; index) {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (index &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;||&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;==&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;throw&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; ArgumentException(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;index&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;protected&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;override&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Size MeasureOverride(Size constraint) {&lt;br /&gt;           Size sizeDesired &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Size(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;);&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (Child &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;br /&gt;               Child.Measure(constraint);&lt;br /&gt;           }&lt;br /&gt;           sizeDesired.Width &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child.DesiredSize.Width;&lt;br /&gt;           sizeDesired.Height &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child.DesiredSize.Height;&lt;br /&gt;&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; sizeDesired;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;protected&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;override&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Size ArrangeOverride(Size arrangeBounds) {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (Child &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;!=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;br /&gt;               Rect rect &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Rect(&lt;br /&gt;                   &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Point((arrangeBounds.Width &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child.DesiredSize.Width) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;br /&gt;                               (arrangeBounds.Height &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Child.DesiredSize.Height) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;),&lt;br /&gt;                               Child.DesiredSize);&lt;br /&gt;               Child.Arrange(rect);&lt;br /&gt;           }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; arrangeBounds;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Using a DependencyProperty as the backing store for OffDuration.  This enables animation, styling, binding, etc...&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;readonly&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty OffDurationProperty;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Using a DependencyProperty as the backing store for OnDuration.  This enables animation, styling, binding, etc...&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;readonly&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty OnDurationProperty;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Using a DependencyProperty as the backing store for RiseDuration.  This enables animation, styling, binding, etc...&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;readonly&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty FadeInDurationProperty;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; Using a DependencyProperty as the backing store for DeclineDuration.  This enables animation, styling, binding, etc...&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;readonly&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty FadeOutDurationProperty;&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; OnDuration {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)GetValue(OnDurationProperty); }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { SetValue(OnDurationProperty, value); }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; OffDuration {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)GetValue(OffDurationProperty); }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { SetValue(OffDurationProperty, value); }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; FadeInDuration {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)GetValue(FadeInDurationProperty); }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { SetValue(FadeInDurationProperty, value); }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; FadeOutDuration {&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)GetValue(FadeOutDurationProperty); }&lt;br /&gt;           &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; { SetValue(FadeOutDurationProperty, value); }&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Blink() {&lt;br /&gt;               &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt; register dependency properties &lt;/span&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                OffDurationProperty &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty.Register(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;OffDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Blink), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; UIPropertyMetadata(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1.0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;               OnDurationProperty &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty.Register(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;OnDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Blink), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; UIPropertyMetadata(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1.0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;               FadeInDurationProperty &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty.Register(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;FadeInDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Blink), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; UIPropertyMetadata(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0.2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;               FadeOutDurationProperty &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; DependencyProperty.Register(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;FadeOutDuration&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;typeof&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(Blink), &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; UIPropertyMetadata(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0.5&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;));&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;The code was developed on Vista using the RC1 bits of the .NET 3.0 SDK&lt;/p&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;br /&gt;&lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:e3121559-9f9b-4aaa-8ad3-80ca601273d6" contenteditable="false" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/WPF" rel="tag"&gt;WPF&lt;/a&gt;, &lt;a href="http://technorati.com/tags/XAML" rel="tag"&gt;XAML&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-9082053009141555298?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/9082053009141555298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=9082053009141555298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/9082053009141555298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/9082053009141555298'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/10/on-steroids.html' title='&amp;lt;Blink&amp;gt; on steroids...'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-6365758219641234660</id><published>2006-09-28T20:38:00.001+03:00</published><updated>2006-09-28T20:38:26.050+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WLW'/><title type='text'>Windows Live Writer - I18N not complete</title><content type='html'>&lt;p&gt;After performing the usual* test when getting a &lt;em&gt;System.FormatException&lt;/em&gt; it seems that the I18n has not yet been done properly in Windows Live Writer. Basically (it seems like)&amp;nbsp;the code assumes&amp;nbsp;. (dot) as a decimal separator somewhere, but gets a , (comma) since the Swedish (Finland) locale (sv-FI) uses comma as decimal separator.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Workaround:&lt;/strong&gt; Change the decimal separator to a dot.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Usual test:&lt;/strong&gt; Change the regional settings to use English (United States)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:09ab442f-a6b6-48d9-b537-7a1f618a5dda" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/Windows%20Live%20Writer" rel="tag"&gt;Windows Live Writer&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-6365758219641234660?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/6365758219641234660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=6365758219641234660' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6365758219641234660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/6365758219641234660'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/windows-live-writer-i18n-not-complete.html' title='Windows Live Writer - I18N not complete'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-8101559763235945869</id><published>2006-09-28T20:26:00.001+03:00</published><updated>2006-09-28T20:26:44.676+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WLW'/><title type='text'>Hello World from Windows Live Writer</title><content type='html'>&lt;p&gt;After installing the latest version of &lt;a href="http://windowslivewriter.spaces.live.com/Blog/cns!D85741BB5E0BE8AA!702.entry"&gt;Windows Live Writer&lt;/a&gt;&amp;nbsp;and applying the &lt;a href="http://jcheng.wordpress.com/2006/09/28/blogger-beta-workaround"&gt;workaround&lt;/a&gt; for beta.blogger I'm now successfully posting from Windows Live Writer running on Vista x64 (5728)&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:ebc67387-885f-42c3-9aa9-56560f3b6d08" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/Vista" rel="tag"&gt;Vista&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Windows%20Live%20Writer" rel="tag"&gt;Windows Live Writer&lt;/a&gt;&lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;Update: Did not work on first try...&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:f3c88b84-7fdb-4382-8f10-6f81b1ea9367" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;pre style="background-color:#FF80C0;"&gt;&lt;div&gt;&lt;!--&lt;br /&gt;&lt;br /&gt;Code highlighting produced by Actipro CodeHighlighter (freeware)&lt;br /&gt;http://www.CodeHighlighter.com/&lt;br /&gt;&lt;br /&gt;--&gt;&lt;span style="color: #000000; "&gt;System.FormatException: Input string was not in a correct format.&lt;br /&gt;   at System.Number.StringToNumber(String str&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; NumberStyles options&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; NumberBuffer&amp;amp; number&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; NumberFormatInfo info&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; Boolean parseDecimal)&lt;br /&gt;   at System.Number.ParseDouble(String value&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; NumberStyles options&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; NumberFormatInfo numfmt)&lt;br /&gt;   at System.Double.Parse(String s&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; NumberStyles style&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; NumberFormatInfo info)&lt;br /&gt;   at WindowsLive.Writer.BlogClient.Clients.AtomClient.ParseRfc3339(String dateTimeString)&lt;br /&gt;   at WindowsLive.Writer.BlogClient.Clients.AtomClient.Date(XmlNode node&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; String xpath&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; DateTime defaultValue)&lt;br /&gt;   at WindowsLive.Writer.BlogClient.Clients.AtomClient.Parse(XmlElement entryNode)&lt;br /&gt;   at WindowsLive.Writer.BlogClient.Clients.AtomClient.NewPost(String blogId&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; BlogPost post&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; Boolean publish)&lt;br /&gt;   at WindowsLive.Writer.BlogClient.Blog.NewPost(BlogPost post&lt;/span&gt;&lt;span style="color: #000000; "&gt;,&lt;/span&gt;&lt;span style="color: #000000; "&gt; Boolean publish)&lt;br /&gt;   at WindowsLive.Writer.PostEditor.UpdateWeblogAsyncOperation.DoWork()&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-8101559763235945869?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/8101559763235945869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=8101559763235945869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8101559763235945869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8101559763235945869'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/hello-world-from-windows-live-writer_6686.html' title='Hello World from Windows Live Writer'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-8028403405079033581</id><published>2006-09-23T00:35:00.000+03:00</published><updated>2006-09-23T00:38:02.710+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Humor'/><title type='text'>Joke of the day</title><content type='html'>The potential effect of the recent (laptop) battery recalls is a brilliant topic for a &lt;a href="http://www.comics.com/wash/pcnpixel/archive/pcnpixel-20060913.html"&gt;comic&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-8028403405079033581?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/8028403405079033581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=8028403405079033581' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8028403405079033581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/8028403405079033581'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/joke-of-day_23.html' title='Joke of the day'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-908110654695572234</id><published>2006-09-18T00:07:00.000+03:00</published><updated>2006-09-18T00:15:00.300+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xcopy'/><category scheme='http://www.blogger.com/atom/ns#' term='robocopy'/><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><title type='text'>xcopy deployment deprecated</title><content type='html'>(Spotted at &lt;a href="http://channel9.msdn.com/ShowPost.aspx?PostID=235751#235751"&gt;Channel9&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;It seems that xcopy deployment just got deprecated:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&gt;xcopy /?&lt;br /&gt;Copies files and directory trees.&lt;br /&gt;&lt;br /&gt;NOTE: Xcopy is now deprecated, please use Robocopy.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;Robocopy shows:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&gt;robocopy /?&lt;br /&gt;-------------------------------------------------------------------------------   ROBOCOPY     ::     Robust File Copy for Windows&lt;br /&gt;-------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So I guess that's the end of xcopy deployment and beginning of robocopy deployment, (or are they pushing ClickOnce deployment all the way?)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-908110654695572234?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/908110654695572234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=908110654695572234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/908110654695572234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/908110654695572234'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/xcopy-deployment-deprecated.html' title='xcopy deployment deprecated'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-4025433421848957107</id><published>2006-09-12T23:02:00.000+03:00</published><updated>2006-09-12T23:14:28.370+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><category scheme='http://www.blogger.com/atom/ns#' term='UAC'/><title type='text'>Oh the joys of UAC (NOT)</title><content type='html'>Tried to do a little bughunting on a WCF project, the problem specifically related to dual bindings. However, I did not get so far, since I soon found out through "trial and horror" that in Vista you are &lt;strong&gt;not&lt;/strong&gt; allowed to bind to a port unless running under elevated privileges.&lt;br /&gt;&lt;br /&gt;Yes, UAC strikes once again!&lt;br /&gt;&lt;br /&gt;I soon found out that this is a &lt;a href="http://dotnet.org.za/armand/archive/2006/06/14/53390.aspx"&gt;known issue&lt;/a&gt; and how you should work around it. Basically you add a manifest to the exe requesting elevated privileges.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0"&gt;&lt;br /&gt;  &amp;lt;trustinfo xmlns="urn:schemas-microsoft-com:asm.v3"&gt;&lt;br /&gt;    &amp;lt;security&gt;&lt;br /&gt;      &amp;lt;requestedprivileges&gt;&lt;br /&gt;        &amp;lt;requestedexecutionlevel level="requireAdministrator"&gt;&lt;br /&gt;      &amp;lt;/requestedprivileges&gt;&lt;br /&gt;    &amp;lt;/security&gt;&lt;br /&gt;  &amp;lt;/trustinfo&gt;&lt;br /&gt;&amp;lt;/assembly&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;However, I couldn't get this working under a debugger !?! (The manifest is there as both &lt;em&gt;exename.exe.manifest&lt;/em&gt; and &lt;em&gt;exename.vshost.exe.manifest&lt;/em&gt;)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;So, how is one supposed to debug a WCF server on Vista !?!&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-4025433421848957107?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/4025433421848957107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=4025433421848957107' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4025433421848957107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/4025433421848957107'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/oh-joys-of-uac-not.html' title='Oh the joys of UAC (NOT)'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-1095432974429373450</id><published>2006-09-11T18:12:00.000+03:00</published><updated>2006-09-11T18:14:25.853+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><title type='text'>Uninstalling Google Toolbar on Vista</title><content type='html'>I recently installed Google toolbar to get &lt;em&gt;"BlogThis&lt;/em&gt;" functionality. Alas, I soon discovered that as I use the new beta blogger, this functionality is not supported in the current version of the toolbar :( However, more annoyingly, the toolbar seems to break the right-click context menu..&lt;br /&gt;&lt;br /&gt;So I wanted to get rid of the toolbar as soon as possible (at least for the time being).&lt;br /&gt;&lt;br /&gt;Now comes the big problem, the thing won't let me uninstall it, complaining about unsufficient permissions, yada yada. Basically because of &lt;a href="http://www.microsoft.com/technet/windowsvista/security/uacppr.mspx"&gt;UAC&lt;/a&gt; even though you have admin privileges you are not running with them all of the time. A properly configured installer will ask for elevated privileges, but it seems the Toolbar installer is not clever enough to do this..&lt;br /&gt;&lt;br /&gt;So here's how you do it:&lt;br /&gt;Right-click IE icon, choose "Run as Administrator", and then proceed to uninstalling the toolbar. Needless to say, it is probably safest to not go around surfing the 'net as Administrator...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-1095432974429373450?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/1095432974429373450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=1095432974429373450' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1095432974429373450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/1095432974429373450'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/uninstalling-google-toolbar-on-vista.html' title='Uninstalling Google Toolbar on Vista'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-5440230479095344922</id><published>2006-09-10T00:50:00.000+03:00</published><updated>2006-09-10T00:58:14.566+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='databinding'/><title type='text'>Playing around in WPF land</title><content type='html'>With a little (ok, a lot of) help from &lt;a href="http://www.infusionblogs.com/blogs/jsmith/archive/2006/07/01/614.aspx"&gt;Josh Smith&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/karstenj/archive/2006/01/27/518499.aspx"&gt;Karsten Januszewski/Andrew Whiddett&lt;/a&gt; I managed to put together a little ComicBook application that utilizes Asynchronous databinding, animated image transitions. It's not quite finished yet, but the parts that are left should mostly be a walk in the park (i.e. known territory). Not bad for an evenings worth of work, considering this is my first "real" WPF application.&lt;br /&gt;&lt;br /&gt;The learning curve is steep...&lt;br /&gt;&lt;br /&gt;I probably post more technical stuff when I get it closer to what I want it to be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-5440230479095344922?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/5440230479095344922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=5440230479095344922' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5440230479095344922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/5440230479095344922'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/playing-around-in-wpf-land.html' title='Playing around in WPF land'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7750150832171257253</id><published>2006-09-08T21:13:00.000+03:00</published><updated>2006-09-08T21:15:35.951+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Humor'/><title type='text'>Joke of the day</title><content type='html'>Ok, I admit I'm a little bit late, but I found &lt;a href="http://ars.userfriendly.org/cartoons/?id=20060903"&gt;this (Userfriendly) comic&lt;/a&gt; quite amusing. :-) &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7750150832171257253?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7750150832171257253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7750150832171257253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7750150832171257253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7750150832171257253'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/joke-of-day.html' title='Joke of the day'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-29320649908534881</id><published>2006-09-07T23:10:00.000+03:00</published><updated>2006-09-07T23:21:58.894+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Orcas'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>Developing WCF without Orcas CTP</title><content type='html'>For various reasons I installed the .NET 3.0 RC1 Runtime/SDK as soon as they were available. This meant that I didn't have a CTP of Orcas to go with it. As I currently don't have any WPF stuff to do I figured I'd manage just as fine without it.&lt;br /&gt;&lt;br /&gt;However, when I started a new project using WCF it got interesting, I could build already made WCF projects, but &lt;span style="font-weight: bold;"&gt;System.ServiceModel&lt;/span&gt; (and &lt;span style="font-weight: bold;"&gt;System.Runtime.Serialization&lt;/span&gt; for that matter) was nowhere to be found in the &lt;span style="font-style: italic;"&gt;Add reference...&lt;/span&gt; dialog.&lt;br /&gt;&lt;br /&gt;As I also do fiddle around with msbuild stuff I figured that I could work around this quite easily by firing up the project xml file (right-click the project, choose Unload project, right-click the unloaded project, choose Edit &lt;projectname&gt;.csproj, Edit away..., then right-click project, Reload project)&lt;br /&gt;&lt;br /&gt;and add the missing reference to the project by hand&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;&lt;/span&gt;&lt;span style="color: rgb(153, 51, 0);"&gt;Reference&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Include&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;="System.ServiceModel" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Still, I thought it was kinda funny that the workaround was needed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;EDIT: This is not an issue anymore since &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=935AABF9-D1D0-4FC9-B443-877D8EA6EAB8&amp;amp;displaylang=en"&gt;Orcas CTP for RC1&lt;/a&gt; has been released.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-29320649908534881?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/29320649908534881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=29320649908534881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/29320649908534881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/29320649908534881'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/developing-wcf-without-orcas-ctp.html' title='Developing WCF without Orcas CTP'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-3471295593237664036</id><published>2006-09-07T22:50:00.000+03:00</published><updated>2006-09-07T22:56:39.868+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Scoping issues in C#</title><content type='html'>Came across some "interesting" scoping rules of C# at work today.Consider the following:            &lt;span style="font-family:courier new;"&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;try&lt;/span&gt; {                &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;    int&lt;/span&gt; answer = 42;            &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;} &lt;span style="color:#3333ff;"&gt;catch&lt;/span&gt; {                &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;    &lt;span style="color:#33cc00;"&gt;// ...&lt;/span&gt;            &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;}            &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; answer = 42;&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This one errors out with the somewhat curious error message:&lt;br /&gt;Error    1    &lt;strong&gt;A local variable named 'answer' cannot be declared in this scope because it would give a different meaning to 'answer', which is already used in a 'child' scope to denote something else&lt;/strong&gt;    C:\Path\To\File.cs    15    17    TheProject&lt;br /&gt;&lt;br /&gt;Out of curiosity we tried the following:&lt;br /&gt;           &lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;try&lt;/span&gt; {               &lt;br /&gt;    &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; answer = 42;           &lt;br /&gt;} &lt;span style="color:#3333ff;"&gt;catch&lt;/span&gt; {               &lt;br /&gt;    &lt;span style="color:#33cc00;"&gt;// ...&lt;/span&gt;           &lt;br /&gt;}           &lt;br /&gt;answer = 42; &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;&lt;/span&gt;&lt;br /&gt;This (rightfully IMO) errors out in the following way (the same thing happens by the way if the second assignment is within the catch block):&lt;br /&gt;Error    1    &lt;strong&gt;The name 'answer' does not exist in the current context&lt;/strong&gt;    C:\Path\To\File.cs    15    13    TheProject&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-3471295593237664036?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/3471295593237664036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=3471295593237664036' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3471295593237664036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/3471295593237664036'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/scoping-issues-in-c.html' title='Scoping issues in C#'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4412878736726215017.post-7465061052134927379</id><published>2006-09-02T22:58:00.000+03:00</published><updated>2006-09-02T23:01:49.490+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><title type='text'>Vista RC1 is out</title><content type='html'>As Vista RC1 was released to β testers yesterday. I naturally had to get it installed right away, so currently &lt;i&gt;AllThingsMedia&lt;/i&gt; is happily running Vista x64 build 5600. Expect a more general release of the RC1 sometime next week..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4412878736726215017-7465061052134927379?l=mostlytech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mostlytech.blogspot.com/feeds/7465061052134927379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4412878736726215017&amp;postID=7465061052134927379' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7465061052134927379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4412878736726215017/posts/default/7465061052134927379'/><link rel='alternate' type='text/html' href='http://mostlytech.blogspot.com/2006/09/vista-rc1-is-out.html' title='Vista RC1 is out'/><author><name>/SiD</name><uri>http://www.blogger.com/profile/14502300853105995585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
