- Changing Theme in Windows 10 UWP App Programmatically
- 4 Answers 4
- How To Change Theme in Windows 10 (All Ways)
- Where Windows 10 stores themes
- Change the theme in Windows 10 using the Control Panel
- Apply a High Contrast theme using Settings
- Change the Windows theme from File Explorer
- Change your theme with Winaero Theme Switcher
- About Sergey Tkachenko
- How To Change The Default Theme In Windows 10
- To change the current theme
- To install a new theme
- Install themes from Store in Windows 10
- How to change the Windows 10 theme
- First things first: What is a Windows 10 theme?
- How to change the theme in Windows 10
- How to get a new theme in Windows 10
- Did you find any exciting themes in the Microsoft Store?
Changing Theme in Windows 10 UWP App Programmatically
I was able to change theme using this.RequestedTheme = ElementTheme.Dark; But what I need is the whole application level, since this one only change the theme of the current page to dark.
Whenever I try this App.Current.RequestedTheme = ApplicationTheme.Dark; I always get this error
An exception of type ‘System.NotSupportedException’ occurred in UWPApp.exe but was not handled in user code
Is there such a way that I can change the whole application theme from Light to Dark or vice versa?
I’m using VS2015
4 Answers 4
Updated answer with what I finally decided on.
I used a settings class that holds all of the apps settings including what theme to use. Since the theme can only be set when it starts we need to make sure to set it them. This is the code I used:
In the App.xaml.cs file:
In the App.xaml file make sure to remove this property:
If its not removed it always default to light with no way to change it.
This way the user can choose the theme, it gets stored and used when the app starts. Just make sure to load it and apply it in the app initialization phase.
Application’s RequestedTheme can only be updated in constructor.However (as you discovered) , Page’s RequestedTheme can be updated anytime in runtime.
This is really annoying I know and there’s not much information about this situation other than this MSDN page :
The theme can only be set when the app is started, not while it’s running. Attempting to set RequestedTheme while the app is running throws an exception (NotSupportedException for Microsoft .NET code). If you give the user an option to pick a theme that’s part of app UI, you must save the setting in the app data and apply it when the app is restarted.
There should be workarounds but they’ll be very dumb.Microsoft doing this in their own official apps like Groove though .
My solution is doing theme updating on the Element level , not the Application level.
- Create your own BasePage (inherited from Page)
- Keep your settings under a static class and create an Event for keep tracking the model changes.
- In your BasePage’s constructor listen to this event and apply changes when there’s.
I’m not able to provide code example right now (since i’m very busy today) , but this is by far the most efficient way IMHO.
How To Change Theme in Windows 10 (All Ways)
Windows 10 supports themes which may include custom desktop backgrounds, sounds, mouse cursors, desktop icons, and an accent color. There are a number of methods you can use to change a theme in Windows 10. Let’s review them all.
In Windows 10, you can get extra themes using Windows Store or install them from a themepack file. Themes may include:
- Desktop background: An image, a set of images, or a solid color which can be used as a wallpaper.
- Colors. Windows 10 allows changing the color of the window frame, window borders, active elements and selected items.
- Sounds. A set of sounds that are assigned to various events like notifications, message dialogs, window operations, emptying the Recycle Bin, and so on.
- Screen Saver. Screen savers were created to save very old CRT displays from being damaged by issues like screen burn-in. These days, they are mostly used to personalize the PC with entertaining visuals or improve its security with additional password protection.
- Pointers. By default, Windows 10 comes with no custom cursors bundled and uses the same cursors as Windows 8. Users who love customizing their OS may want to change them.
- Desktop Icons. Themes can change icons like This PC, Recycle Bin, and so on.
Where Windows 10 stores themes
Windows 10 stores themes under different folders.
- Themes that you’ve installed manually, saved, or synced from your Microsoft account are stored in the folder %LocalAppData%\Microsoft\Windows\Themes .
- Default themes are the ones that come pre-installed with Windows 10. They can be found in the folder C:\Windows\Resources\Themes .
- High Contrast Themes. — Themes that make items on your screen easier to see. They are part of the Ease of Access feature of Windows 10. They can be found in the folder C:\Windows\Resources\Ease of Access Themes .
The current theme can be found in the Registry. See the CurrentTheme string (REG_SZ) value under the following key:
See the following screenshot:
To change the theme in Windows 10, do the following.
- Open the Settings app.
- Go to Personalization ->Themes.
- On the right, click on a theme you like under Apply a theme.
- The theme is now applied.
Alternatively, you can use the classic Control Panel applet to quickly apply a custom theme, or any of the default themes, or the High Contrast theme.
Change the theme in Windows 10 using the Control Panel
- Press the Win + R keys on the keyboard.
- Type or copy-paste the following command in the Run box: explorer.exe shell.
. - This will open the classic Personalization applet. Click on the desired theme in the list to install it.
Apply a High Contrast theme using Settings
- Open the Settings app.
- Go to Ease of Access -> High Contrast.
- On the right, set the option Turn on high contrast.
- From the Choose a theme drop down list, choose one of the four pre-installed High Contrast themes.
Finally, you can apply a theme from a file manager app like File Explorer.
Change the Windows theme from File Explorer
- Open File Explorer app.
- Navigate to the folder which contains the *.theme file of the theme you want to apply. The default folders are mentioned in the beginning of this article. e.g., visit the folder C:\Windows\Resources\Themes .
- Double-click on the *.theme file to apply the theme. The theme will be applied. Also, Windows 10 will open the Themes page of the Settings app.
Change your theme with Winaero Theme Switcher
Winaero Theme Switcher is an application which allows you to change a Windows theme from the command line. It is primarily intended to be used with the command prompt or in a batch file where you want to automate the applying of a custom theme.
The syntax is as follows:
To apply one of the default themes, you can run the following command:
Running the app without parameters will open the following GUI.
Please refer to the following article to learn useful tips and tricks about this app:
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
Share this post
About Sergey Tkachenko
Sergey Tkachenko is a software developer from Russia who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.
How To Change The Default Theme In Windows 10
Last Updated on October 13, 2020 by admin 7 Comments
The desktop theme feature was first introduced with Windows 7 and is exist in the latest Windows 10 as well. While a desktop theme usually includes a bunch of cool wallpapers, it’s possible to bundle mouse cursors, sound schemes, desktop icons, and screen savers with it.
In Windows 7 and 8/8.1, we could easily install new themes and switch between installed themes by opening the Personalization window.
In Windows 10, when you right-click on the desktop and click Personalize option, the Personalization section of the Settings app is launched instead of the classic Personalization window. Because of this, if you want to change the default theme to a newly installed one in Windows 10 or uninstall a desktop theme to free up some disk space, you need to follow a couple of extra steps.
Whether you want to switch between installed themes or uninstall a theme in Windows 10, you can use the directions mentioned in below given methods.
NOTE: Desktop themes are entirely different from visual styles. This guide covers only installing and switching between desktop themes and not visual styles.
To change the current theme
Step 1: Right-click on desktop, click Personalize option to open and navigate to Personalization section of the Settings app.
Step 2: Switch to Themes by clicking on Themes.
Step 3: The Change theme section displays all installed themes. To apply a theme, click on it. To download more themes, click the Get more themes in Microsoft Store link to open the themes page in the Windows 10 Store app and then install themes you want.
And if you want to change the default color, please follow our how to open the Color and Appearance window in Windows 10 guide. The theme color can be changed under the Settings app as well.
To install a new theme
Step 1: There are many safe places on the web from where you can download hundreds of elegant themes. One of them is Microsoft’s own personalization gallery page.
Visit the official Windows personalization gallery page to download as many themes as you want. The Personalization gallery features over 300 themes. Note that themes that were released for Windows 7 and Windows 8 are compatible with Windows 10, as well.
Step 2: After downloading themes, double-click on a theme to install and apply the theme.
Alternatively, you can right-click on a theme and then click the Open option to install and apply the theme. The installed theme can be seen by navigating to Settings > Personalization > Themes.
To switch between installed themes, please follow the instructions mentioned in Method 1 or Method 3.
Install themes from Store in Windows 10
The official Store app now offers hundreds of themes for Windows 10. Here is how to install themes from Store in Windows 10.
Step 1: Click here to open the Windows Themes section in your current web browser. Browse all the themes click on a theme to view all wallpapers included in the theme.
Step 2: Click the Get button. When you get the prompt asking permission to open the page in Microsoft Store, click the Open Microsoft Store or Yes button.
Step 3: The selected theme’s page will now be opened with the Store app. Click the Get button to install the theme. All installed themes can be seen by navigating to Settings > Personalization > Themes page.
How often do you install new desktop themes?
How to change the Windows 10 theme
Windows 10 is versatile when it comes to customization, and changing its theme lets you modify several of its elements at the same time. You can change the background, the color, the sound, and the mouse cursor whenever you choose a new theme. This tutorial illustrates how to change the theme on your Windows 10 computer or device:
NOTE: The features presented are available in Windows 10 November 2019 Update or newer. If you’re using an older version of Windows 10, you might not have access to all the features. Check your Windows 10 build and, if necessary, get the latest Windows 10 update available for you.
First things first: What is a Windows 10 theme?
A theme is a collection of settings that you can apply in order to change visual and sound aspects in Windows 10. While most themes we came across only alter the color scheme and wallpapers used by Windows 10, some can also change the sound scheme, the mouse cursor’s appearance, and even standard desktop icons.
More importantly, you can save your favorite groups of settings as themes, switch between them at will, and even sync settings to apply your theme to other Windows 10 devices.
Keep in mind that the Dark Mode and Light Mode features introduced with Windows 10 are also influenced and can be altered by your chosen theme.
How to change the theme in Windows 10
To access the themes available in Windows 10, we found it easiest to first right-click or press-and-hold on a free area of the desktop, and then go to Personalize in the contextual menu.
This opens the Personalization settings. Click or tap on the Themes tab from the column on the left.
At the top of the Themes tab, you can see the elements that make up your Current theme – in our case, called Custom. Scroll down to the Change theme section underneath to discover all the themes available on your Windows 10 computer or device.
All you need to do in order to apply a new theme is to click or tap on it – we selected the Flowers theme. It might take a few seconds, but you should first see your new desktop wallpaper applied, and then a few other elements of your interface might change colors. Scroll up again to see the key elements that make up the new Windows 10 theme.
That is all. Close Settings and enjoy your new theme!
How to get a new theme in Windows 10
If none of the available themes are to your liking, you can install and use new ones. As an alternative to the path in the previous section, you can open Windows 10’s Settings and go to “Personalization -> Themes.“ In the Change theme section, you might have noticed the “Get more themes in Microsoft Store” link. Click or tap on it.
This opens the Microsoft Store, showing the available Windows Themes.
Scroll through the available options until something catches your eye. Then, click or tap on the theme to open its page in the Microsoft Store. Considering we woke up to eight inches of snow today, we decided Chilly Morning was an appropriate theme.
You can scroll through the information available on the theme’s page to learn more about it and preview some of its wallpapers. When you’ve made up your mind, click or tap on Get.
Wait for a couple of seconds while the theme is downloaded and installed. A progress bar on top keeps you apprised of the progress.
When the installation process is complete, your new theme becomes available in the Change theme section, and you can click or tap on it to apply it, as previously illustrated.
Enjoy your new Windows 10 theme!
Did you find any exciting themes in the Microsoft Store?
Themes are a great way to try out different looks for your Windows 10 interface. We found some amazing ones in the Microsoft Store, such as Cobwebs or Abstract Bubbles. What about you? What themes did you find interesting? Share your findings in the comments below.