Data See, Data Do

Mike Hillberg's Blog on Wpf and Silverlight

September, 2006

  • Data See, Data Do

    Brief anatomy of a ListBox

    ListBox has properties on it that allow you to control how the items in the list box get displayed. Those properties make sense if you understand some basic concepts of the ListBox, but sometimes I forget, so I wanted to post a picture on my wall. Except...
  • Data See, Data Do

    Xaml Inspired Markup

    A lot has been written about how Xaml maps tags and attributes to objects and properties. But it’s not necessary that Xaml actually be used to create .Net objects. Maybe you don’t plan to for your markup to be mapped to objects, at least not today. But if you already work with Xaml, following the same syntax conventions as Xaml for your other markup provides some nice consistency and readability, and a possible future path to intuitive code manipulation....
  • Data See, Data Do

    Tip: Cannot animate '...' on an immutable object instance

    Help for working around a “Cannot animate '...' on an immutable object instance” exception....
  • Data See, Data Do

    Tips & Tricks: How to undo an implicit style

    You can define a style that gets used by all elements of a type. But what if you want one of the buttons to break from this standard, and go back to “normal”?...
  • Data See, Data Do

    A trigger for the TreeViewItem directly under the mouse

    In a post to the WPF forum, martinabc wanted to define a TreeViewItem style that would trigger off whether or not the mouse was over that item. A trigger on the IsMouseOver property sounds promising, but unfortunately IsMouseOver is true not only for the item under the mouse, but for the ancestors of that item as well. One possibility is to create a custom template for the TreeViewItem, but that’s an unfortunate amount of work. So for fun I created an IsMouseDirectlyOverItem property....
  • Data See, Data Do

    Sharing, and not sharing, Setter.Value in a Style or Template

    Setter values in a style or template get shared, which is good for performance, but impacts how some features work, especially elements and Freezables....
  • Data See, Data Do

    The Loaded event and the Initialized event

    In WPF, controls have both a Loaded even and an Initialized event. Initializing and loading a control tend to happen at about the same time, and consequently these events fire at roughly the same time. But they have slightly – though important – different meanings, and the differences can be a source of confusion. So here’s some background on how we designed these events....
  • Data See, Data Do

    Being written by XamlWriter

    A big part of WPF (Avalon) is the Xaml format for creating object trees. You can also go in the other direction – take an object tree and write it out to Xaml – with the XamlWriter class. That mostly just works, but there are cases where XamlWriter needs some help from you to write your class correctly. This post describes what you need to do....
  • Data See, Data Do

    Trace sources in WPF


    WPF (Avalon) uses the .Net tracing system to provide some diagnostics about what’s going on inside your WPF application. It’s not at all an exhaustive set of traces, and in fact it’s still pretty rudimentary. But frequently it’s enough to help out when you’re trying to debug a problem.

Page 1 of 1 (9 items)