Wasn't my MSN help good enough Steve? :p
For the benefit of others, just use a listbox and let it init the other controls for you: http://alexshed.spaces.live.com/blog/cns!71C72270309CE838!133.entry Thanks, Tatham Oddie au mob: +61 414 275 989, us cell: +1 206 331 5568, skype: tathamoddie, landline: +61 2 8011 3982, fax: +61 2 9475 5172 my business: <http://tixi.com.au/> tixi.com.au - Ticketing without the dramas From: ozsilverlight@ozsilverlight.com [mailto:ozsilverli...@ozsilverlight.com] On Behalf Of Stephen Price Sent: Thursday, 23 April 2009 8:14 PM To: ozsilverlight@ozsilverlight.com Subject: Style checkbox in a custom control Hey all, I'm wanting to create a default style for a number of checkboxes that are added to a custom control dynamically in code. I'd like the style to go in the generic.xaml and have found some info on applying styles to controls via TemplateBindings, but it doesn't look like I can do that in code. (Must be the only thing you have to do in xaml and can't do in code??) I was thinking of opening up a .g.cs file to see how its doing it from the xaml but can't find a way to intentionally open a .g.cs file. (Have opened them when had errors in them) anyone seen anything on this or done it? thanks, Stephen _____ Support procedure: https://www.codify.com/lists/support List address: <mailto:ozsilverlight@ozsilverlight.com> ozsilverlight@ozsilverlight.com Subscribe: <mailto:ozsilverlight-subscr...@ozsilverlight.com> ozsilverlight-subscr...@ozsilverlight.com Unsubscribe: <mailto:ozsilverlight-unsubscr...@ozsilverlight.com> ozsilverlight-unsubscr...@ozsilverlight.com List FAQ: <http://www.codify.com/lists/ozsilverlight> http://www.codify.com/lists/ozsilverlight Other lists you might want to join: <http://www.codify.com/lists> http://www.codify.com/lists -------------------------------------------------------------------------------- Support procedure: https://www.codify.com/lists/support List address: ozsilverlight@ozsilverlight.com Subscribe: ozsilverlight-subscr...@ozsilverlight.com Unsubscribe: ozsilverlight-unsubscr...@ozsilverlight.com List FAQ: http://www.codify.com/lists/ozsilverlight Other lists you might want to join: http://www.codify.com/lists