Porbably an ItemsControl if you dont want the list behavior (selection etc)... 
ItemsControl rocks for dynamic stuff :)

From: [email protected] [mailto:[email protected]] 
On Behalf Of Tatham Oddie
Sent: Thursday, 23 April 2009 8:47 PM
To: [email protected]
Subject: RE: Style checkbox in a custom control

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: tixi.com.au - Ticketing without the dramas<http://tixi.com.au/>

From: [email protected] [mailto:[email protected]] 
On Behalf Of Stephen Price
Sent: Thursday, 23 April 2009 8:14 PM
To: [email protected]
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: 
[email protected]<mailto:[email protected]>
Subscribe: 
[email protected]<mailto:[email protected]>
Unsubscribe: 
[email protected]<mailto:[email protected]>
List FAQ: http://www.codify.com/lists/ozsilverlight
Other lists you might want to join: http://www.codify.com/lists
________________________________
Support procedure: https://www.codify.com/lists/support
List address: 
[email protected]<mailto:[email protected]>
Subscribe: 
[email protected]<mailto:[email protected]>
Unsubscribe: 
[email protected]<mailto:[email protected]>
List FAQ: http://www.codify.com/lists/ozsilverlight
Other lists you might want to join: http://www.codify.com/lists

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.287 / Virus Database: 270.12.3/2075 - Release Date: 04/22/09 
17:25:00
--------------------------------------------------------------------------------
Support procedure: https://www.codify.com/lists/support
List address: [email protected]
Subscribe: [email protected]
Unsubscribe: [email protected]
List FAQ: http://www.codify.com/lists/ozsilverlight
Other lists you might want to join: http://www.codify.com/lists

Reply via email to