-
Notifications
You must be signed in to change notification settings - Fork 798
Open
Labels
area-NugetPackageIssue with the nuget package developer experience (e.g. build error, missing files)Issue with the nuget package developer experience (e.g. build error, missing files)area-XamlCompilerbugSomething isn't workingSomething isn't workingneeds-winui-3Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)product-winui3WinUI 3 issuesWinUI 3 issuesteam-ControlsIssue for the Controls teamIssue for the Controls teamteam-MarkupIssue for the Markup teamIssue for the Markup teamwct
Description
Describe the bug
Unable to create new controls inheriting from a MUX WinUI 2.x base control. The control template will never be applied.
Steps to reproduce the bug
Using the attached repro project below:
- Using the WUX namespace set a breakpoint on
base.OnApplyTemplate(). When code is run the breakpoint should be hit:

- Change to the MUX namespace for the base control and run again with the same breakpoint:

- The breakpoint in OnApplyTemplate() is never hit and the control template is never applied.
Note that if you change the DefaultStyleKey = typeof(ColorPicker) (the base type) that will work.
Expected behavior
It should be possible to inherit from a MUX WinUI 2.x base control and have the new control template applied.
Screenshots
Using WUX the template is correctly applied:

Using MUX no template is applied:

Also see above.
Version Info
NuGet package version:
Microsoft.UI.Xaml 2.4.3
Windows app type:
| UWP | Win32 |
|---|---|
| Yes | N/A |
| Windows 10 version | Saw the problem? |
|---|---|
| Insider Build (xxxxx) | |
| May 2020 Update (19041) | Yes |
| 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 | Yes |
| Xbox | |
| Surface Hub | |
| IoT |
Additional context
This is a pretty major roadblock. I need a work-around or fix pretty quickly...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-NugetPackageIssue with the nuget package developer experience (e.g. build error, missing files)Issue with the nuget package developer experience (e.g. build error, missing files)area-XamlCompilerbugSomething isn't workingSomething isn't workingneeds-winui-3Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)product-winui3WinUI 3 issuesWinUI 3 issuesteam-ControlsIssue for the Controls teamIssue for the Controls teamteam-MarkupIssue for the Markup teamIssue for the Markup teamwct