lepoco / lepoco/wpfui

TaskBarService.SetState() does not work on Loaded event

Open
#301 0 comments 0 reactions 1 assignee View on GitHub

@pomianowski is already working on this.

Since Jul 24, 2022.

bug
Dominant language
C#
Stars
9.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
TaskBarService.SetState does not work when called from the Container.Loaded event.

To Reproduce
Just open the demo app and look at the taskbar, it should show an indeterminate state at first and then (after the splash screen) set to normal.

The window handle seems to be OK in the UnsafeNativeMethods.SetTaskbarState() method.

Expected behavior
The .SetState() method of the injected TaskBarService must set the state correctly.

Desktop:

  • OS: Windows 11 (21H2)
  • .NET: net6.0
  • Version: 2.0.2

Additional context
It is working when triggered, for example, by a button in any view/page.
It is also working using the ExperimentalDashboard "template", that uses the .SetValue() method but this will require a lot of refactoring to me.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.