View Single Post
Old 02-11-2006   #3 (permalink)
Michael Latta


 
 

Re: How to change Style at runtime in application-level

I would not think you can just modify the style object and have the system
do the right thing. It might work, but I would be surprised they chose to
have that level of overhead listening for changes on style objects. What is
likely to work is to derive a new style object from the old one, then assign
the new style to the visuals you wish affected. If you want to restyle
elements with updated default styles that may take some experimentation. I
would think that once a style is applied to an element, that changes to the
style object are not reapplied to the element. However when you set the
style property to a new style it would update the element.

Michael


"HolaMan" <reality.chang@gmail.com> wrote in message
news:1139477354.044628.33090@o13g2000cwo.googlegroups.com...
>
> I have the book "Programming Windows Presentation Foundation" O'Reilly
> There's a solution for replace skin at runtime in Chapter 6.
> It dynamically replace the Application.Current.Resources, and it works.
>
> But I still have no idea how can I modify the style which in use.
> Thanks :-)
>



My System SpecsSystem Spec