Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

programatically changing the ControlTemplate of a ListBox

Closed Thread
 
Thread Tools Display Modes
Old 01-10-2006   #1 (permalink)
craig kelly-soens www.XpectWorld.com
Guest


 

programatically changing the ControlTemplate of a ListBox

hi,

given the much cut down example below how do i programatically change the
template to left aligned text in the RadioButton ?

<ListBox Name="GroupSelector">
<ListBox.Resources>
<Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<RadioButton Name="TheListBoxRadioButtons"
HorizontalContentAlignment="Center"....

I have been looking into
"GroupSelector.Template.TargetType"
but cannot find the RadioButton object to set the HorizontalContentAlignment
despite digging in deep.
This is a central and generic much-used class, i need to be able to alter
its properties dynamically,
a new ad-hoc style is not an option.

many thanks

craig kelly-soens - Windows Vista WinFx XAML .Net Evangelist
http://www.XpectWorld.com - for customised "super-easy to use" Windows Vista
based software
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy to get handle from listbox. How to get listbox from handle? IMAFriend .NET General 0 03-27-2008 08:31 PM
Programatically changing JPG Metatags Dzomlija Vista music pictures video 0 01-11-2008 04:38 AM
CustomControl and controlTemplate Eager Avalon 3 09-28-2007 02:06 AM
User controls in a ControlTemplate Griff Avalon 1 05-26-2006 04:28 AM
Tooltip ControlTemplate Erno Avalon 1 02-02-2006 12:50 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50