Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Stop MahApps.Metro Overriding Styles for Basic Controls

All, I have started using MahApps.Metro but some controls that this library overrides (GroupBox for example) are, to me, a little too rambunctious.

My question is sinple: if I want to stop MahApps.Metro overriding the style of a certain control, what can I do?

I have attempted to fix this for a DataGrid by overriding the DataGrid creating my own public class SomeDataGrid : DataGrid and this allows me to use this control as WPF default. However, to do this for ALL the controls is non-ideal.

Thanks for your time.

like image 820
MoonKnight Avatar asked Jul 28 '13 12:07

MoonKnight


1 Answers

For the control, which you do not want to overwrite the style, set style null:

<ProgressBar Style="{x:Null}" Width="300" Height="30" IsIndeterminate="True" />

This construction set the Style for the control's default value.

like image 162
Anatoliy Nikolaev Avatar answered Oct 11 '22 15:10

Anatoliy Nikolaev