Hi,
My application A is written in WPF, I have some global styles that I set in the Application level [App.xaml]. Example below:
<Style TargetType="{x:Type ComboBox}">[change background color]</Style>
I created a host, which is WPF as well, to host A as an activeX. Since I set the style in the Application level, my Host get styled as well.
I've been researching for few days on how to prevent this,
1. Include 'key' in the style, all the control in A will need to use the key.
2. In the host, App.xaml, set the global style to be empty, so that it will overwrite the global style.
<Style TargetType="{x:Type ComboBox}"></Style>
My problem: I can't control the host to overwrite the global style. As my application is quite huge, it is not practical for me to add in the key for all the controls that we did not specify a style using key.
Question: Are there any other way to prevent the activeX client WPF global style to affect the host?
Or is there any way for me to apply the global style within my application only?
Any help is appreciated.