locked
avoid Mulitloading/Looploading from resources

    Question

  • Hi and sorry for the silly question,

    I want increase the startup-performance from my app, so I decided to avoid multiloading of resources, but how can access them over app.xaml?

    example:
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="Styles/AStyles.xaml" />
                    <ResourceDictionary Source="Styles/BStyles.xaml" />   
                </ResourceDictionary.MergedDictionaries>
    I need some resources from AStyles in BStyles. Now i load them a second time in BStyles, otherwise i get an exception because he can't initalize something.

    thanks for help.
    Wednesday, October 15, 2014 9:57 AM

All replies

  • Create a single XAML page with all of the styles you need in it?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, October 15, 2014 2:12 PM
    Moderator
  • the app has about 200 styles, I think the clarity get lost if i do this.
    Is there another way?
    Wednesday, October 15, 2014 2:30 PM