RogerSchlueter-7899 avatar image
0 Votes"
RogerSchlueter-7899 asked

Don't Understand Error in a Style

I am trying to write a style that includes a Template following the example on [this page][1]. Here is my Style.

     <Setter Property="OverridesDefaultStyle" Value="True"/>
     <Setter Property="Template">
                 <DockPanel x:Name="dpnl">
                     <Label x:Name="lblDay" />
                     <StackPanel />
                     <ContentPresenter />

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers