Re: Style checkbox in a custom control
You'll find the .g.cs files under your obj folder in your project... Hope this helps Chris Anderson 2009/4/23 Stephen Price step...@littlevoices.com 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: 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 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
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: 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
RE: Style checkbox in a custom control
Porbably an ItemsControl if you dont want the list behavior (selection etc)... ItemsControl rocks for dynamic stuff :) From: ozsilverlight@ozsilverlight.com [mailto:ozsilverli...@ozsilverlight.com] On Behalf Of Tatham Oddie Sent: Thursday, 23 April 2009 8:47 PM To: ozsilverlight@ozsilverlight.com 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 dramashttp://tixi.com.au/ 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: ozsilverlight@ozsilverlight.commailto:ozsilverlight@ozsilverlight.com Subscribe: ozsilverlight-subscr...@ozsilverlight.commailto:ozsilverlight-subscr...@ozsilverlight.com Unsubscribe: ozsilverlight-unsubscr...@ozsilverlight.commailto:ozsilverlight-unsubscr...@ozsilverlight.com 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: ozsilverlight@ozsilverlight.commailto:ozsilverlight@ozsilverlight.com Subscribe: ozsilverlight-subscr...@ozsilverlight.commailto:ozsilverlight-subscr...@ozsilverlight.com Unsubscribe: ozsilverlight-unsubscr...@ozsilverlight.commailto:ozsilverlight-unsubscr...@ozsilverlight.com 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: 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
Re: Style checkbox in a custom control
Ah-hah! there they are... thanks for that. :) On Thu, Apr 23, 2009 at 6:33 PM, Chris Anderson christheco...@gmail.comwrote: You'll find the .g.cs files under your obj folder in your project... Hope this helps Chris Anderson 2009/4/23 Stephen Price step...@littlevoices.com 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: 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 -- 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 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