Skip to content

[Bug]: Resource keys from page-level and ms-appx merged dictionaries are reported as not found #353

Open

Description

Describe the bug

Resource dictionaries merged at page or element level (Page.Resources / Grid.Resources with MergedDictionaries or Source=) and ms-appx:///<ReferencedProject>/... dictionaries are never followed. Every key from them is reported as WXAML0013. The same dictionaries merged from App.xaml in the same project work.

To Reproduce

  1. Add Styles\PageOnly.xaml defining <SolidColorBrush x:Key="PageOnlyBrush" Color="Red"/>.
  2. In a page: <Page.Resources><ResourceDictionary Source="ms-appx:///Styles/PageOnly.xaml"/></Page.Resources> and <Border Background="{StaticResource PageOnlyBrush}"/>.
  3. See WXAML0013 The resource 'PageOnlyBrush' was not found.
  4. Separately: in App.xaml merge ms-appx:///Contoso.Controls/Styles/ControlColors.xaml from a referenced library; its keys are flagged too.

Expected behavior

Keys from these merged dictionaries resolve and appear in {StaticResource} completion.

Notes

Typed dictionaries (<local:MyResources/>) are tracked in #303. Bug bash IDs: C-12, C-14.

Screenshots

No response

OS Version and details

Windows 11 x64 (10.0.26200), VS Code 1.143.1, .NET SDK 10.0.403. Found in the XAML IntelliSense bug bash on 0.3.1-prerelease.456 (PR #276, f90df977).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions