The official Microsoft article states:
Modify the default system styles
You should use the styles that come from the Windows Runtime default XAML resources when you can. When you have to define your own styles, try to base your styles on the default ones when possible (using based-on styles as explained earlier, or start by editing a copy of the original default style).
I understand that you can copy and paste the default style from MSDN in order to "start by editing a copy of the original". However, that strikes me as very ugly and inelegant, as I'm pasting in almost a 100 lines even if I just want to add one thing.
I like the idea of "using based-on styles" to include all of the default style by reference, but from what I can tell the original default styles supplied by Microsoft are implicit. Given that they have no key to reference them by, how can BasedOn
be used?
You are right about that
BasedOn
won't work with default styles as they are implicit.However, you don't have to include the full style code if you simply want to edit some properties.
For example, the
Button
below will inherit everything from the default style except theBackground
color being changed toRed
.