Avoid theming of labels WPF

I am using labels in a custom Legend for charting, where I would like to set the textcolor (Foreground brush) to the same color as the corresponding line in the chart. However, the textcolor is always white, even when I set the Tag of the label, as well as the Tag of the ViewItemWpfUsercontrol to “DoNotThemeMe”. When I’m using a textblock instead of a label the textcolor is the color I’m setting, but now the background of the textblock is always set to the theme background, also setting the Tag to “DoNotThemeMe”.

Is there a way to really avoid theming? Or could it be a bug that the “DoNotThemeMe” tags are not respected?

I’m using SC 2017R3 together with the MIPSDK 2017R3. Windows 7 or 10 makes no difference.

For the WPF controls the “DoNotThemeMe” tags are not respected, instead apply a style. If you have applied a style it will not be overwritten by the theming in Smart Client.

I will make correction to the MIP documentation, thank you for putting this to my attention.

Thanks for the solution, when I apply a style to the control or it’s container it is shown the way it’s supposed to!