I am trying to write a style that includes a Template following the example on [this page][1]. Here is my Style.
<Style
TargetType="Border">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="Border">
<DockPanel x:Name="dpnl">
<Label x:Name="lblDay" />
<StackPanel />
<ContentPresenter />
</DockPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
The compile-time error I get is: The member "Template" is not recognized or is not accessible.
But that is exactly how the example shows it should be done.
What's wrong?
ETA: Here are the Tags I've tried: "Template", "Style", "Visual Studio" and "XAML" None are acceptable. Nothing else is appropriate so my tag is therefore useless.
[1]: https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.contentpresenter?view=netframework-4.7.1