Sunday, November 23, 2008
One of my passions is music, especially the discovery of new music. Back in the day I used to walk into Wax Trax Records in Denver or Albums on the Hill in Boulder and walk out with a stack of CDs that I’d grabbed for no other reason than I liked the album art or the tight-pants wearing clerk behind the counter nodded vaguely in its direction. Sometimes it worked out; Mentallo & The Fixer, Arctic Monkeys (before they were big, bought only because the word Monkey was in their name), and a few others. Other times it was a
Thursday, November 06, 2008
A common question in the forums has been how to get dynamic icons in the Silverlight Toolkit TreeView and luckily there are quite a few options. The Icon Before you can make the icon dynamic you need a place to put it. The basic idea is to create a HierarchicalDataTemplate and make room for an image: <stackpanel.resources> <controls:hierarchicaldatatemplate x:key="TaxonomyTemplate" itemssource="{Binding Subclasses}"> <stackpanel orientation="Horizontal"> <contentpresenter margin="0 0 4 0" content="???" /> <textblock text="{Binding Classification}" /> </stackpanel> </controls:hierarchicaldatatemplate> </stackpanel.resources> <controls:treeview x:name="MasterTree" itemtemplate="{StaticResource TaxonomyTemplate}" /> I've added a ContentPresenter and the Content is what we're interested in setting dynamically. Option #1 – The