-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom style is not applied #3499
Comments
Since I can see my Bug report #3502 getting closed as duplicate :) I'm duplicating my report for a similar issue below: 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:
Note that if you change the 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 |
This looks like WinUI3 vs the other issue is in WinUI2.x |
While these are similar, I agree with @ranjeshj that they are most likely different. This particular issue, which is a WinUI3 one, seems like a dupe of microsoft/CsWinRT#345 |
@StephenLPeters @stevenbrix I can't see solution for this issue in microsoft/CsWinRT#345 (Closed) or am i missing? |
It should be Fixed with CsWinRT1.0.1 which is included in Winui3 preview 3. so the issue should be resolved by upgrading to that when it becomes available. |
Describe the bug
I have a custom control derived from DropdownButton and have style for this control. But custom style is not applied.
Steps to reproduce the bug
public sealed class CustomControl1 : DropDownButton
{
public CustomControl1()
{
this.DefaultStyleKey = typeof(CustomControl1);
}
Expected behavior
This custom style should be applied.
Version Info
NuGet package version: 3.0.0-preview2.200713.0
Windows app type:
Additional context
But for me when custom style is used OnApplyTemplate itself is not called. And it works well for controls derived from Button, ListView but not fro DropdownButton, SplitButton, TabView and NavigationView.
The text was updated successfully, but these errors were encountered: