I am encountering a very weird issue. I am trying to apply global styling to several controls within a DataGrid
. Most of them work exactly how I would expect them t
So with a bit more digging and a little luck, I discovered that WPF does not apply implicit styles inside templates unless the TargetType
derives from Control
. Since TextBlock
doesn't derive from Control
, its style is not applied. So you either have to manually apply the style to every non-Control
or define the implicit style inside the template.
The following MSDN blog post explains it in pretty good detail.
https://docs.microsoft.com/en-us/archive/blogs/wpfsdk/implicit-styles-templates-controls-and-frameworkelements