microsoft / microsoft/microsoft-ui-xaml
Applying a template to `BreadcrumbItem` using style works differently then setting template directly
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
When a control template is applied to `BreadcrumbBarItem` using style WinUI cannot initialize it failing on finding deferred element by name, while it works fine if control template inlined or set using static resource.
### Steps to reproduce the bug
Use reproduction project [BreadcrumbTemplateRepro.zip](https://github.com/user-attachments/files/17646048/BreadcrumbTemplateRepro.zip)
Notice that if you extract the template and put it inline, project will run without any issues
### Expected behavior
Template initialization works consistently in all cases: inline, static resource, within a style
### Screenshots
_No response_
### NuGet package version
WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002
### Windows version
Windows 11 (22H2): Build 22621
### Additional context
_No response_
Contributor guide
Research direction
Start with the attached BreadcrumbTemplateRepro.zip and reproduce the failure on Windows App SDK 1.6.1. Compare BreadcrumbBarItem template initialization when the template is inline, a static resource, and supplied through a style, focusing on the deferred-element-by-name failure. Done means all three forms initialize consistently without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100