Welcome to MSDN Blogs Sign in | Join | Help

Data See, Data Do

Mike Hillberg's Blog on Wpf and Silverlight

Syndication

News

All postings are provided "As Is" with no warranties, and confers no rights. Opinions and views expressed here are not necessarily those of Microsoft Corporation.


Browse by Tags

A Custom Storyboard Component in Xaml
In WPF & Silverlight, a Storyboard is a collection of animations running in parallel. Not everyone likes the name “Storyboard” though. The idea behind the name was that that list of timelines running in parallel are like a list of plot lines in the Read More...

Posted Friday, November 20, 2009 3:19 PM by MikeHillberg | 0 Comments

TreeView and HierarchicalDataTemplate, Step-by-Step
I’ve never found TreeView to be terribly confusing by itself. But usually I want to data bind a TreeView to a collection with some hierarchy, which leads me to HierarchicalDataTemplate, which didn’t always just write itself for me. If you look at it in Read More...

Posted Friday, October 30, 2009 12:40 PM by MikeHillberg | 0 Comments

Filed under: ,

Attachment(s): TreeViewStepByStep.zip

Why is it called a "DependencyProperty"?
When we create new classes and members we spend a lot of time and effort to make them as usable, understandable, and discoverable as possible. We follow the .Net Design Guidelines in general, and in particular we constantly look at how this new class Read More...

Posted Friday, March 27, 2009 10:04 AM by MikeHillberg | 5 Comments

Filed under:

Implementing SelectedValue with the Silverlight ComboBox
Here’s the scenario … You have a Customers collection and an Orders collection. In the Orders collection, an Order has a CustomerID property; this is the key to an item in the Customers collection. Your goal is a ComboBox that updates the CustomerID property Read More...

Posted Thursday, March 26, 2009 10:53 PM by MikeHillberg | 8 Comments

Filed under:

Attachment(s): SelectedValue.zip

An ICommand with IsEnabled
ICommand is a simple interface with three members – Execute, CanExecute, and CanExecuteChanged (more on those here ). You can write your own implementations of that interface, one for each command, but that gets a bit heavyweight. So there are several Read More...

Posted Monday, March 23, 2009 10:13 PM by MikeHillberg | 4 Comments

Filed under:

ICommand is like a chocolate cake
(This has been updated with some information about the origin of a routed command’s route, and of focus scopes.) ICommand in WPF is a pretty simple thing at its core. But it gets more interesting and complicated as you build up functionality on top of Read More...

Posted Friday, March 20, 2009 3:48 PM by MikeHillberg | 5 Comments

Filed under:

A master/detail view with navigation
I don’t remember what got me thinking about it, but somewhere along the line I wanted a master/detail view with a navigation bar. E.g., when you change selection in the master view, you can navigate back to the previous selection. Here’s an example (here Read More...

Posted Friday, January 09, 2009 10:50 AM by MikeHillberg | 3 Comments

Filed under:

A Comparable DataTrigger
Property triggers today only check for equality. We’d like to add support for other comparison operators, but that hasn’t happened yet. But I needed them for a project, and wrote a workaround for it. It’s a bit hacky in a couple of places, but if you Read More...

Posted Tuesday, September 30, 2008 12:04 AM by MikeHillberg | 6 Comments

Compact CheckBox Sample
I was creating a view of an object that had a bunch of boolean properties, but I wanted to keep the visual representation small. So I created a look for a compact CheckBox that I liked enough to post. As an example scenario, say I’m visualizing a the Read More...

Posted Friday, June 13, 2008 3:17 PM by MikeHillberg | 1 Comments

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 Read More...

Posted Thursday, May 29, 2008 2:15 PM by MikeHillberg | 1 Comments

Filed under:

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, Read More...

Posted Friday, May 23, 2008 4:46 PM by MikeHillberg | 5 Comments

Filed under:

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; Read More...

Posted Wednesday, May 21, 2008 3:05 PM by MikeHillberg | 4 Comments

Filed under: ,

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 Read More...

Posted Monday, May 05, 2008 9:56 AM by MikeHillberg | 3 Comments

Simple way to create a gradient brush in Xaml
Rob , Nikhil & I were talking today about the early days of Xaml when you could create linear gradient brushes as an attribute value. E.g. (borrowing from Rob’s post on this subject) instead of creating a LinearGradientBrush for the fill of a rectangle Read More...

Posted Thursday, April 24, 2008 11:06 PM by MikeHillberg | 1 Comments

Filed under: ,

A Context-Sensitive Help Provider in Wpf
Here's an example of a way to add context-sensitive help to your application. The main idea is to simply use the built-in ApplicationCommands.Help command. This command is already tied to the F1 key, and so executes when you hit F1, and tells your command Read More...

Posted Thursday, July 26, 2007 10:56 PM by MikeHillberg | 12 Comments

Filed under:

Attachment(s): ContextSensitiveHelp.zip

More Posts Next page »
Page view tracker