DesktopWindowXamlSource Empty Window: How to Remove It?

Repairing the corrupt system files will fix this problem

Reading time icon 3 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

Key notes

  • This DesktopWindowXamlSource empty window error is linked with Microsoft OneDrive. 
  • To fix this error, check for Windows update, update or reinstall OneDrive.

DesktopWindowXamlSource is a Windows application programming interface (API) that lets an app host XAML controls in a desktop window. If you see DesktopWindowXamlSource empty window, then it could be due to API being misused. 

The issue is linked with Microsoft OneDrive and got fixed in 2021. However, the forums flooded with questions regarding the error suggest otherwise. 

Here in this guide, we will discuss some methods to fix the error after discussing the causes. Let’s get started! 

What causes DesktopWindowXamlSource empty window to come up? 

There can be various reasons for the empty window to come up; some of the popular ones are: 

  • Problem with Windows UI automation framework –  If there is an issue with the Windows UI automation framework, which is responsible for providing accessibility features for Windows apps, then it might be stuck with the desktop window XAML source not responding
  • Windows updates pending – If your computer has pending Windows updates, you might get this error. 
  • Problem with the OneDrive app – If the app in question is not working fine or has some missing files, you could get this error. 
  • Corrupt system files – If your Windows has damaged system files, then it could cause a lot of issues, including this one. 

What can I do to remove the DesktopWindowXamlSource empty window?

Before engaging in the troubleshooting steps to eliminate this problem, please perform these preparatory checks: 

  • Restart the OneDrive app
  • Restart your computer 

1. Update the Windows 

  1. Press Windows + I to get Settings.
  2. Click Windows Update from the left pane, and click Check for updatesWindows Update
  3. If there is an update, download and install it.
  4. Restart your computer when prompted.

2. Repair corrupt system files 

  1. Press the Windows key, type CMD and click Run as administratorDOS COmmand Prompt - DesktopWindowXamlSource empty windowjoin windows 11 to domain
  2. Type the following command and press Enter: sfc/scannow
  3. Copy and paste the following commands one by one and press Enter after every command: DISM /Online /Cleanup-Image /CheckHealth DISM /Online /Cleanup-Image /ScanHealth DISM /Online /Cleanup-Image /RestoreHealth
  4. Wait for the process to complete, and restart your computer. 

3. Update OneDrive

  1. Press Windows + R to open the Run window. 
  2. Type the following command to reset OneDrive and press Enter : %localappdata%\Microsoft\OneDrive\onedrive.exe /resetRun command - Update One Drive -DesktopWindowXamlSource empty window
  3. Next, copy and paste the following command to update OneDrive and press Enter: %localappdata%\Microsoft\OneDrive\update
  4. Finally, restart your PC to let the changes take place. 

4. Reinstall OneDrive

  1. Press Windows + R to open the Run window. Programs and Features - DesktopWindowXamlSource empty window
  2. Type appwiz.cpl and press Enter to open Programs and features.
  3. Locate and select Microsoft OneDrive. Then, click Uninstall from the menu. Uninstall OneDrive -Programs and Features - DesktopWindowXamlSource empty window
  4. Wait for the app to be uninstalled. 
  5. Now download OneDrive.
  6. Double-click the installer file and follow the onscreen instructions to complete it. 

So, these are the methods to remove DesktopWindowXamlSource empty window. Try them and let us know what worked for you to resolve this OneDrive error in the comments section below.

More about the topics: windows 10 fix, Windows 11

User forum

0 messages