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 ???????????????
I am not quite sure I fully understand your scenario.
When setting the theme, you can use the GetResourceSet method, which has Groupings parameter like (Editors, DataPresenter, Primitives). You can use that to set the theme only for the XamDataPresenters, if you have any.
If you have, for example, 5 XamNumericEditors, and you want one of these to have the normal theme, you have to do that manually. You can use the ThemeManager.SetTheme method and set the theme to "Aero" just for this particular XamNumericEditor.
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
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.