Skip to content

[Feature]: Show the same resource writes in the DevTools inspector and the CLI #1365

Open

Description

Is your feature request related to a problem? Please describe.

This is a follow-up to #1194, which lets winapp devtools set-property assign {ThemeResource key} and {StaticResource key}. The inspector (the window winapp devtools inspect opens) can also assign resources. The two keep separate records of these writes, so each shows something different for the same property:

  • CLI write, inspector view: after
    winapp devtools set-property <textblock> Foreground '{ThemeResource TextFillColorPrimaryBrush}' -a <pid>
    
    the inspector still shows Foreground as it is in the XAML file, or as a plain color. It doesn't show the assigned key. get-property shows Foreground: #E4000000 [DevTools ThemeResource TextFillColorPrimaryBrush].
  • Inspector write, CLI view: after the inspector assigns a resource, get-property shows [DevTools] instead of [DevTools ThemeResource <key>]. After a theme switch it can lose the label entirely, because nothing recorded that the value should follow the theme.

Describe the solution you'd like

Both tools show the same resource and key, whichever one made the write:

  1. The inspector's resource write (Route1Resolve in DevToolsTap.EditBridges.inc) records the write with DevToolsBindingRow_NoteLiveResourceWrite, as the CLI path (AssignResource) does.
  2. ToCardRow copies the row's liveResourceKind/liveResourceKey fields, and the inspector shows them in the property's label.

Additional context

This depends on the #1194 implementation landing first; the live-resource fields don't exist on main yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions