Is ControlTemplate's OnApplyTemplate() Not Being Called on Skia Desktop in Uno Platform? #20498
-
Hey community! I’m investigating upgrading an existing Uno Platform project to replace net9.0-windows10.0.26100 with net9.0-desktop using Skia Desktop renderer. The current project has many custom controls that are implemented as ControlTemplates. Everything works well when using the net9.0-windows10.0.26100 target framework, but I’ve noticed when switching to the net9.0-desktop that the OnApplyTemplate() doesn’t seem to be called as expected. Again, OnApplyTemplate() is not called, so GetTemplateChild() always returns null on net9.0-desktop. A few things I've tried:
Has anyone else run into this with Skia Desktop? Is there a known workaround, or is there some documentation about Skia Desktop's support for ControlTemplates that I am missing? 🤔 References: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Thanks for the report. It's best if you can provide a repro for this issue. |
Beta Was this translation helpful? Give feedback.
-
Per your request...On TargetFrameworks: net9.0-windows10.0.26100![]() On TargetFrameworks: net9.0-desktop;![]() |
Beta Was this translation helpful? Give feedback.
Thanks, you've hit this issue: #10327.
Include your themes by bringing them into your app.xaml merged dictionaries.
This particular feature is generally used in libraries, which is why it's not been included yet in the app's head.