OnIdiom not working when using as style resource #10894
Labels
area-xaml
XAML, CSS, Triggers, Behaviors
migration-compatibility
Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
platform/android 🤖
platform/iOS 🍎
platform/macOS 🍏
macOS / Mac Catalyst
platform/windows 🪟
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
Currently migrating from XF to Maui, I have multiple pages/views where I defined OnIdiom as resource like so:
Im using those resources multiple times, like this:
I get the following error:
XFC0009 No property, BindableProperty, or event found for "Default", or mismatching type between value and property. Futura.IA.Models.Views D:\...\AddressView.xaml
The same code is working fine for my Xamarin.Forms Project. I can workaround the issue by not using the StaticResource extension and replace the Style with OnIdiom Markup like this:
<ColumnDefinition Width="{OnIdiom Default=0.25*, Phone=0.33*}" />
Is this working as intended? If yes I have to change a lot of views
Steps to Reproduce
Add a new Page or Control and use OnIdiom as Style Resource as mentioned above or compile the sample repo.
Link to public reproduction project repository
https://github.com/nschoenberg/OnIdiomRepro
Version with bug
6.0.486 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
Windows 11
Did you find any workaround?
Yes, using OnIdiom as markup extension directly instead of static resource
Relevant log output
No response
The text was updated successfully, but these errors were encountered: