UWPSpy

Introducing UWPSpy, an inspection tool for UWP and WinUI 3 applications that enables to view and manipulate UI elements and their properties in real time.

I’ve been interested in UWP since the release of Windows 11, where the taskbar UI was reimplemented using a new technology called XAML Islands. I created UWPSpy after gaining some experience with UWP. UWPSpy makes it easy to experiment with UWP UI elements and see how various changes behave before making them permanent. One example where UWPSpy comes in handy is with the Windows 11 Taskbar Styler mod, refer to its details page to see examples of UI customizations that are possible.

Download

zip UWPSpy.zip (413.33 kB)

Usage

  • Run UWPSpy.exe and select the UWP/WinUI 3 application you want to spy on.
  • A window with the application’s UI elements will appear for each UI thread of the target application.

Source code

https://github.com/m417z/UWPSpy

Demonstration

Posted in Releases, Software by Michael (Ramen Software) on August 9th, 2023.
Tags:

27 Responses to “UWPSpy”

  1. Pat says:

    This is amazing! Features I’d like to see are..

    Restore to default, Backups
    Undo, redo
    Color picker
    Dark mode

  2. Dook says:

    Please tell me how to find the property responsible for the spacing between icons in the tray.

    • The spacing is controlled by two parameters:

      • MinWidth of the NotifyIconView element, set to 32 on my computer.
      • Padding of the grid child element marked on the screenshot, set to 4 on my computer.

      The MinWidth value can be configured by the Windows 11 Taskbar Styler mod as can be seen on the screenshot. The grid element isn’t accessible by a name or an indicative type, so customizing its padding by the mod will require more effort. Still, with just MinWidth the width can be reduced from 32 to 24, and set to any value above 24.

  3. Stamimail says:

    Hi Michael :),
    What if someone wants to make the changes permanent?

    Is there a solution for this? Maybe Resource Hacker? A new generator?

    • Hi,

      An equivalent for Resource Hacker could probably be some .pri file editor, but currently, there isn’t even a public tool to parse and view those files properly. Probably the best thing out there is PRIExplorer, but it’s not maintained and doesn’t support new files. Keeping it up-to-date it isn’t simple, and implementing editing is even more challenging. Also, for store apps, normally the user doesn’t have permissions to edit the app files.

      An alternative approach is to do the customization in runtime. For the taskbar, there’s the Windows 11 Taskbar Styler Windhawk mod. For the start menu, there’s Windows 11 Start Menu Styler. For the latter, there isn’t actually anything specific to the start menu in the mod, so you can try and target other processes with it to customize them. It’s not fully tested and supported, but should work. Let me know if you need help with setting it up.

  4. Ivan says:

    is it possible to change the size of the titlebar buttons (minimize, maximize, close)?

  5. Veintch says:

    Hello, is it possible to target Start menu search with this?

  6. jotapê says:

    Hello, Michael, and thank you for this really cool tool!

    Would it be possible to offset the taskbar icons to the left, while still keeping them centered? I have a 2560×1080 monitor and it leads to a worse reading experience for viewers whenever I stream on Discord. Lately, I’ve been toying with the idea of streaming my screen partially, and while I’ve made progress on the steps needed, the taskbar icons being aligned more to the right on-stream would likely bug me to no end lol.

    Here’s a screenshot of what I mean: https://i.imgur.com/EVZbRlg.png

    Thank you!

    • Hi,

      You can add a margin on the right to the taskbar icons with the Windows 11 Taskbar Styler mod by adding the following target:
      Microsoft.UI.Xaml.Controls.ItemsRepeater#TaskbarFrameRepeater

      And style:
      Margin=0,0,300,0

      Adjust the right margin (300) as needed.

      • jotapê says:

        Thank you so much!!

        It works like a charm, although one small nitpick would be that the start menu is now understandably no longer aligned to the taskbar icons. Would it possible to add a margin on the right to it too, perhaps with the Windows 11 Start Menu Styler?

        Screenshot for reference: https://i.imgur.com/9CsAQI3.png

        • Yes, you can adjust the distance of the start menu from the left edge of the screen with:
          Target: StartDocked.StartSizingFrame
          Style: Canvas.Left=100

          Replace 100 as needed.

          You can discover adjustments like this by experimenting with UWPSpy.

          • jotapê says:

            Thank you, thank you, thank you!!!

            Apologies for leeching off your knowledge, I did play around with UWPSpy for a while, but I’m really not familiar with XAML (?) so I wasn’t able to figure out much by myself. I really appreciate you taking the time to help me, though! Have a great day/night!

  7. Can I use this to identify specific taskbar program icons so I can use that as a target parameter with the Border function of the windhawk taskbar styler?

    I want to add a left or right border to some so that I can effectively group them according to function without adding a space-wasting blank icon.

    • You should be able to target a taskbar button by its text content like this:
      Taskbar.TaskListButton[AutomationProperties.Name=UWPSpy - Ramen Software - Google Chrome - 1 running window]
      It’s not perfect, as the title can change. Also, the title is only matched when the taskbar button is created.

      I’m not sure there’s a better solution, but you can look for various properties in UWPSpy and look for anything that works better for you.

  8. NExtinWalt says:

    Hey, I used ExplorerPatcher to get the Windows 10 taskbar instead of the Win11 one, and it seems this doesn’t detect that taskbar. How would I go about this?

  9. Hazrdouss says:

    Hi. Is it possible to get the control center (or system tray popouts in general) with this tool? UWP seems to be able to retreive it but not all the popouts and elements… Im trying to use this in pair with windhawk for customization purposes

Leave a Reply