views:

5

answers:

0

As you know, the built-in themes all define styles for the standard controls such as the TreeView control. We're trying to create something that looks an awful lot like a TreeView but isn't actually one, nor is it a subclass of one. It just has parts that we want to look like one for consistency.

For instance, our control too has a selected item whose background we'd love to match to the appearance of the background for the selected item in a TreeView (or more accurately the TreeViewItem) for the current theme. (You can't simply use highlight color as the themes have nice gradient brushes and borders, not just a solid brush.) Same with our expand/collapse togglebuttons. We want them to look just like the ones used in a TreeView for the current theme. (i.e. Sometimes a triangle, sometimes a box with a '+' in it, etc.)

Now while we can simply rip open Expression and copy the styles ourselves (or at least the parts that we need), we'd have to do that for each and every theme that MS provides. Plus, that wouldn't handle newer themes. And in a purest standpoint, that's duplicate styling information which just sits wrong with me.

Also, if someone styles the actual TreeView(Item), we want to pick it up as well. Since the parts that we want to style are required parts of a TreeView, we feel pretty confident that they're in there somewhere style-wise.

Not even sure what I want to do is possible but if anyone knows, they're most likely here on SO!