Skip to content

Visual state manager VisualStateGroups null instead of crashed visual state #3289

@marcelwgn

Description

@marcelwgn

Describe the bug

The progressbar template of this commit does not have a resource for high contrast. When switching from "normal" to high contrast, instead of crashing, the VisualStateManager gives us null for the VisualStateGroups.

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Check out the linked commit
  2. Start app
  3. Switch to high contrast while app is open
  4. Visit ProgressBar page

Expected behavior

VisualStateManager should not return null for the visual state groups.
Screenshots

Version Info

NuGet package version:

Windows app type:

UWP Win32
Windows 10 version Saw the problem?
Insider Build (xxxxx) Yes
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop
Xbox
Surface Hub
IoT

Additional context

Here is the DLM file for the error/crash:

HighContrast-Crash.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-VSMbugSomething isn't workingneeds-winui-3Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)team-MarkupIssue for the Markup team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions