I'm using XamNumericEditor like this
<igEditor:XamNumericEditor Theme="Generic" ......../>
I assigned the theme because i don;t want any style in the programm to overrise the default style
Eventhough when i Apply theme like LipStick [Infragistics them]
this theme override the generic theme for my XamNumericControl why's that happened ???????????????
Hello,
This is happening because the WPF supports only one local style. So when you set a theme, styles that are declared higher in the element tree (for example in the Window's Resouces) will not be picked up. If you want a style to be applied and set a theme, you have to declare the style inside the resources section of that element (XamNumericEditor).
Let me know if you have any questions on this.
thanks Alex
I will try to tell you again what happened maybe my first post was not good
I'm using XamNumericEditor inside user control
I let the user to change the style of the program
when using some style I will call the following code :
app is reference to the current Application.
ResourceDictionary infrajisticsThemeDistionary = Infragistics.Windows.Themes.ThemeManager.GetResourceSet(infrajisticsTheme, Infragistics.Windows.Themes.ThemeManager.AllGroupingsLiteral);
app.Resources.MergedDictionaries.Clear();app.Resources.MergedDictionaries.Add(infrajisticsThemeDistionary);
okay when i add the resource dictionary every things are good
now after styling the program with the new style
I need to make the XamNumericEditor in Generic Style or Classic Style I don't know actually the exact name
But I mean I don't want this Control to Apply the Theme
I made this code in XamNumericEditor but nothing happened
<igEditors:XamNumericEditor ,.... .........
Style="{StaticResource {x:Type igEditors:XamNumericEditor}}"
/>
thanks alot againg mr Alex