Skip to content
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

A -desktop only project fails applying styles to a templated control #18157

Closed
mcNets opened this issue Sep 9, 2024 · 4 comments
Closed

A -desktop only project fails applying styles to a templated control #18157

mcNets opened this issue Sep 9, 2024 · 4 comments
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/styling 👔 Categorizes an issue or PR as relevant to element styling triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@mcNets
Copy link
Contributor

mcNets commented Sep 9, 2024

Current behavior

I've added a templated control to the project and set a default style in Themes\Generic.xaml, but the style is never set and OnApplyTemplate is never called.

I've added a minimum example following the steps in the docs.

TestTemplatedControl.zip

Then I've created a new project with 2 tfm windows and desktop, the same example works in windows and fails in desktop.

TestControl2.zip

Expected behavior

The style to be applied to the control.

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

Skia (GTK)

IDE

Visual Studio 2022

IDE version

17.12.0 Preview 1.0

Relevant plugins

No response

Anything else we need to know?

No response

@mcNets mcNets added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Sep 9, 2024
@Youssef1313 Youssef1313 added the project/styling 👔 Categorizes an issue or PR as relevant to element styling label Sep 9, 2024
@MartinZikmund
Copy link
Member

@mcNets possible duplicate of #4424?

@MartinZikmund MartinZikmund added triage/needs-information Indicates an issue needs more information in order to work on it. and removed triage/untriaged Indicates an issue requires triaging or verification labels Sep 10, 2024
@mcNets
Copy link
Contributor Author

mcNets commented Sep 10, 2024

@mcNets possible duplicate of #4424?

@MartinZikmund yes, it seems the same issue.

Should I close this one?

Anyway, this is a very old issue (October 30, 2020), docs should reflect this otherwise it can cause confusion.

https://platform.uno/docs/articles/guides/how-to-create-control-libraries.html#create-the-control

@MartinZikmund
Copy link
Member

Yes, we are in process of updating the docs to include this fact. CC @morning4coffe-dev . Closing as duplicate of #4424, hopefully we will resolve that one soon

@morning4coffe-dev
Copy link
Member

Yes, a new docs page is currently on its way – #18175. Hopefully, we can fix the underlying issue as well soon. @mcNets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working project/styling 👔 Categorizes an issue or PR as relevant to element styling triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

4 participants