Trying out Binding.StringFormat

  StringFormat is a new property in .Net 3.5 SP1, which is currently in Beta.  See Scott’s blog for more info on the beta.     When you bind data into a property on an element, it’s automatically type converted for you.  For example, this markup:   <StackPanel xmlns:sys=”clr-namespace:System;assembly=mscorlib”>     <StackPanel.DataContext>         <sys:Int32>123</sys:Int32>     </StackPanel.DataContext>…

7

Of logical and visual trees in WPF

This post is about the “logical tree” in WPF, and how it differs from the visual tree.  For the most part you don’t need to understand this.  But if you want to understand some of the nit-like details of property inheritance, {DynamicResource} references, and ElementName bindings, this may be interesting. A long time ago, I…

9

Model-see, Model-do, and the Poo is Optional

Like a lot of people, I’ve developed software professionally for a lot of different environments:  PC systems and embedded systems; high- and low-level languages; kernel mode, user mode, real mode, and protected mode; system services; domain controllers; bootstrappers; image processors; a debugger; a compiler; a search engine; small systems and really big systems; file systems;…

4

Binding to anonymous types in an Xbap or Silverlight application

It’s easy to use Linq queries to create objects, and to use {Binding}s to bind properties of those objects into your view.  If you’re doing this for an application that will run as an Xbap (“WPF Browser Application”) or as a Silverlight app, just note that you need to generate nominal types rather than anonymous…

5