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

  • Home
  • SEARCH
  • 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 1109695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:16:40+00:00 2026-05-17T02:16:40+00:00

This is probably a really stupid question but I can’t figure this out. I

  • 0

This is probably a really stupid question but I can’t figure this out.

I have a page with a MergeDictionary defined:

  <navigation:Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Assets/TourneySetupStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </navigation:Page.Resources>

and I reference the styles in TourneySetupStyles.xaml in my XAML like this with no problem:

<TextBlock Text="Tourney Name:" Style="{StaticResource TourneySetupTextStyle}" />

However, now I need to add another page resource like this:

But the designer now throws a warning:
“The designer does not support loading dictionaries that mix ‘ResourceDictionary’ items without a key and other items in the same collection. Please ensure that the ‘Resources’ property does not contain ‘ResourceDictionary’ items without a key, or that the ‘ResourceDictionary’ item is the only element in the collection.”

So I add a key to my ResourceDictionary like this:

   <navigation:Page.Resources>
         <local:Tournament x:Key="tournament" />
        <ResourceDictionary x:Key="whatever">
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Assets/TourneySetupStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

    </navigation:Page.Resources>

and the warning goes away. BUT now my reference to the style in TourneySetupStyles no longer works:

“Cannot find a Resource with the Name/Key TourneySetupTextStyle”

So I guess the question is: How do I access the style now that the ResourceDictionary is keyed?

  • 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-17T02:16:41+00:00Added an answer on May 17, 2026 at 2:16 am

    sigh it seems that the order of the declarations is important, as soon as I move the first resource down it now works:

    <navigation:Page.Resources>
        <ResourceDictionary x:Key="TourneySetupStyles">
                <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Assets/TourneySetupStyles.xaml"/>
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>
        <local:Tournament x:Key="tourneySetupViewModel" />
    </navigation:Page.Resources>
    

    If anyone can explain why it would be great for future reference…

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

Sidebar

Related Questions

This is probably a really stupid MSBuild question but if I have <ItemGroup> <Dll
This is probably a really stupid newbie-sounding question to you developer type people, but
This probably sounds really stupid but I have noo idea how to implement jquery's
I know this is probably really obvious, but I cannot figure out why I
Ok. This is probably a really stupid question, but I'm going to ask it
This is probably a really simple jQuery question, but I couldn't answer it after
This is probably a really simple question but... I would like to do a
This is probably a completely stupid question, but i'm pretty new at objective-C and
This probably sounds like a stupid question, but I'm going to give it a
I'm quite new to nHibernate, so this'll probably be a pretty stupid question. But

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.