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 7733025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:52:50+00:00 2026-06-01T06:52:50+00:00

I am creating my first WPF metro app. I am trying to extend the

  • 0

I am creating my first WPF metro app. I am trying to extend the styles that come as part of a Metro app (in the Common/StandardStyles.xaml files)

I am not modifying that file.

Instead, I’ve created another resource file (in the root) called AppStyles.xaml. In it I placed this style:

<!-- Apply to all textblocks-->
<Style BasedOn="{StaticResource BasicTextStyle}" TargetType="TextBlock">
    <Setter Property="Margin" Value="0,10,10,0"/></Style>

But when I run the application I get this error.

Cannot find a Resource with the Name/Key BasicTextStyle [Line: 17 Position: 44]

Is it not possible to do this?

(BTW, nowhere in the entire application does the BasicTextStyle get used or defined on Line 17 of any file, so I have no idea what page it is actually complaining about.)

The file that is handling the error, by the way is “App.g.i.cs” and it is the generic error handler.

The app runs fine if I remove the style I created.

  • 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-06-01T06:52:51+00:00Added an answer on June 1, 2026 at 6:52 am

    I don’t know anything about Metro-specific apps, but this should be standard XAML stuff. You need something like this in your AppStyles.xaml file:

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Common/StandardStyles.xaml" />
    </ResourceDictionary.MergedDictionaries>
    

    Once you have that may you refer to the resource in your custom XAML file. BTW, the error you’re getting is referring to the AppStyles.xaml file itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings, creating my first MVVM based WPF app and trying to figure out why
Hi I am creating my first WPF application that uses Ribbons. The problem I
I'm creating a WPF TimeCard app using the MVVM design pattern, and I'm trying
I'm currently creating my first android app and I've a simple class 'Player' I
I'm relatively new to .Net 4 and I am creating my FIRST WPF application
I am successfully creating database (SQL Ce) using Entity Framework Code First approach (C#-WPF).
I am creating a wpf application. I have to make all textbox first letter
I'm creating a WPF application using the MVVM design pattern that consists of a
I'm creating my first rails app, and using the standard prototype library for some
I am busy creating my first MVVM application in WPF. Basically the problem I

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.