Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6534043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:12:11+00:00 2026-05-25T10:12:11+00:00

Please pardon me for being a complete newbie, but I’m following a tutorial (

  • 0

Please pardon me for being a complete newbie, but I’m following a tutorial (Creating a Custom WPF Button Template in XAML), and I’m running into the error:

FormatException was thrown due to document error: Property ‘Template’ was not found in type ‘FrameworkElement’.

It seems that the error stems from the following code in XAML:

 <Setter Property="Template">
     <Setter.Value>
         <ControlTemplate TargetType="Button">
             <Border Name="border"
                BorderThickness="1"
                Padding="4,2"
                BorderBrush="DarkGray"
                CornerRadius="3"
                Background="{TemplateBinding Background}">
                <Grid >
                <ContentPresenter HorizontalAlignment="Center"
                          VerticalAlignment="Center" Name="contentShadow"
                    Style="{StaticResource ShadowStyle}">
                    <ContentPresenter.RenderTransform>
                        <TranslateTransform X="1.0" Y="1.0" />
                    </ContentPresenter.RenderTransform>
                </ContentPresenter>
                <ContentPresenter HorizontalAlignment="Center"
                       VerticalAlignment="Center" Name="content"/>
                </Grid>
        </Border>

I’ve been looking all over for a solution, but haven’t found one…this leads me to believe that I’m either overlooking or overthinking something.

What am I missing? Thank you in advance for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:12:11+00:00Added an answer on May 25, 2026 at 10:12 am

    A FrameworkElement doesn’t have a Template property. The Template is usually defined on a Control class. This is because most WPF elements derive from FrameworkElement but they don’t all have a Template (StackPanel, for example). Your Setter is probably within a Style (you didn’t post that part). Make sure the TargetType of the Style is the correct type (most likely Button).

    <Style x:Key="InformButton" TargetType="Button">
        <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="Button">
                    <Border Name="border"
                    etc...
    </Style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please pardon the newbie question, but I'm stumped. I'm a teacher converting a Rails
please pardon the absolutely newbie question but i'm very new to tableau. what I'd
Please pardon my lack of Photoshop skills, but I'm curious what type of strategy
Please pardon me if this has been asked before, but I'm wondering if there
I am an iOS newbie, so please pardon me if this is a beginner
Please pardon my C#.Net newbie status. If this is obvious and I missed it
Please pardon me for a n00bish question. Please consider the following code: public class
Please Pardon if the question sounds silly, but nevertheless its a question which I
Please pardon my ignorance. I'm looking for a point in the right direction. I
I am new to the world of ASP.NET and SQL server, so please pardon

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.