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

Fix compiled bindings warnings #547

Closed
13 tasks done
davidbritch opened this issue Dec 2, 2024 · 1 comment · Fixed by #552
Closed
13 tasks done

Fix compiled bindings warnings #547

davidbritch opened this issue Dec 2, 2024 · 1 comment · Fixed by #552
Assignees
Labels
📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@davidbritch
Copy link
Contributor

davidbritch commented Dec 2, 2024

In .NET 9, a warning is produced for every binding expression that uses reflection. Therefore update all the samples in the 9.0 folder to use compiled bindings.

  • Animations
  • Apps
  • Beginner-Series
  • Data
  • Fundamentals
  • Navigation
  • PlatformIntegration
  • SkiaSharp
  • Tutorials
  • UITesting
  • UserInterface
  • WebServices
  • XAML

Associated WorkItem - 350085

@davidbritch davidbritch self-assigned this Dec 2, 2024
@davidbritch davidbritch added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Dec 2, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Dec 2, 2024
@MichaelLHerman
Copy link

I'm especially interested in how to resolve these warnings for TemplateBindings, since I don't see anything about it on the docs

If you build the ControlTemplateDemos sample you will get the following warnings all from TemplateBinding's

1>TemplateBindingCardViewPage.xaml(12,21): Warning XC0022 : Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information.
1>TemplateBindingCardViewPage.xaml(13,21): Warning XC0022 : Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information.
1>TemplateBindingCardViewPage.xaml(27,29): Warning XC0022 : Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information.
1>TemplateBindingCardViewPage.xaml(29,29): Warning XC0022 : Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information.
1>TemplateBindingCardViewPage.xaml(35,32): Warning XC0022 : Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information.
1>TemplateBindingCardViewPage.xaml(42,28): Warning XC0022 : Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information.
1>TemplateBindingCardViewPage.xaml(49,30): Warning XC0022 : Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information.
1>TemplateBindingCardViewPage.xaml(54,28): Warning XC0022 : Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants