views:

735

answers:

1

I have create WPF application and set style of control using style. I have found problem on some control such as Label that I have set FontSize, FontWeight, FontFamily etc. All value is working as I expect except FontSize and FontFamily that seem don't working correctly at runtime. (At design time FontSize and FontFamily is seem to change as the value I have set.)

I try to capture Style of each control at runtime and I found that value of FontSize and FontFamily is correct (same value as I have set it).

Anyone have idea or experience about this kind of problem?

Thanks, Ekkapop

A: 

Is it possible that you specified these values some place else that has a higher priority then your style? (eg local property values or triggers)

a code example could clear things up...

Jo-wen
I try to set the FontSize="20" as local value but it FontSize don't change to 20. (FontSize at runtime is 20)I have no idea about this issue, and can't find the solution at this time.* I have run this code on many PC and the result was same, except on notebook. It render on notebook as I expect.
In The Pink
hmm. What's the difference between your notebook and the other pc's? The only thing I could think of is a different (wpf)theme, but that has a low priority, so that should not influence the values you specify locally. Perhaps you installed newer service packs or anything?
Jo-wen
I have installed all services pack, all of environment is same excepts. It's unpredictable situation that local value must have most priority.
In The Pink