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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:37:56+00:00 2026-05-13T01:37:56+00:00

Hello, how to go from: <Application xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml x:Class=teste.App> <Application.Resources> <!– Resources scoped at

  • 0

Hello, how to go from:

<Application
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 x:Class="teste.App">
 <Application.Resources>
  <!-- Resources scoped at the Application level should be defined here. -->
  <ResourceDictionary>
   <ResourceDictionary.MergedDictionaries>
    **<ResourceDictionary Source="Green.xaml"/>**  
   </ResourceDictionary.MergedDictionaries>
  </ResourceDictionary>
 </Application.Resources>
</Application>

To:

<Application
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 x:Class="teste.App">
 <Application.Resources>
  <!-- Resources scoped at the Application level should be defined here. -->
  <ResourceDictionary>
   <ResourceDictionary.MergedDictionaries>
    **<ResourceDictionary Source="Blue.xaml"/>**  
   </ResourceDictionary.MergedDictionaries>
  </ResourceDictionary>
 </Application.Resources>
</Application>

Dynamically, when users choose the theme… Is it possible?
Thank you
Josi

  • 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-13T01:37:56+00:00Added an answer on May 13, 2026 at 1:37 am

    You could change the resource dictionary dynamically in the code behind, on the load of the page.xaml:

    Application:

    //Load in resources either from application 
            ResourceDictionary dictionary = Application.Current.Resources as ResourceDictionary;
    

    Then once you have the resource dictionary you can apply it using simple logic:

    //Load in xaml
            if (user1)
                themefile = @"[Assembly];component/Themes/blue.xaml";
            else
                themefile = @"[Assembly];component/Themes/green.xaml";
    

    NB: [Assembly] is the namespace of the component where the xaml file exists.

    Then merge it into the dictioanry for the page with:

     XDocument xaml = XDocument.Load(themefile);
     ResourceDictionary rd = XamlReader.Load(xaml.ToString()) as ResourceDictionary;
    
            dictionary.MergedDictionaries.Add(rd);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a loose XAML file... <Style xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:local=clr-namespace:MyNamespace TargetType={x:Type local:CustomControl}> <Setter Property=HoverOpacity
I have a SOAP request of this form: <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:myqname=http://example.com/hello xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance> <soapenv:Header/> <soapenv:Body>
<?xml version=1.0 encoding=UTF-8?> <web-app xmlns=http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version=2.4> <servlet> <servlet-name>InitializationJSP</servlet-name> <jsp-file>/initialization.jsp</jsp-file> <init-param> <param-name>testParam</param-name>
<?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android orientation=vertical > <TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/hello
So right now I'm trying to run the default Hello World! app from developers.android.com.
Hello i can't import the R with the layouts resources from my app this
hello guys i develop a simple app that read an XML file from the
hello guys i develop a simple app that read an XML file from the
10-02 05:36:39.589: E/dalvikvm(2570): Could not find class 'org.bouncycastle.cms.CMSEnvelopedData', referenced from method com.itextpdf.text.pdf.PdfReader.readDecryptedDocObj The logcat
Expecting Hello from the derived. but getting Hello from the base.. class Program {

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.