Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - programatically changing the ControlTemplate of a ListBox

 
 
Old 01-10-2006   #1 (permalink)
craig kelly-soens www.XpectWorld.com


 
 

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

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Easy to get handle from listbox. How to get listbox from handle? .NET General
Programatically changing JPG Metatags Vista music pictures video


Vista Forums 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 Ltd

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