Sunday, December 27, 2015

Styles' BasedOn Default Style

Just a small how-to/tip... and note to self.

Often you want to modify a control's property while keeping the others the same (maintain the other properties' values).

<Style TargetType="Label" BasedOn="{StaticResource {x:Type Label}}">

This modifies the Label type within the context, but retains it's previous style (in my case a ResourceDictionary).

No comments:

Post a Comment