Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Types that require conversion don't work in OnPlatform #13830

Open
mattleibow opened this issue Feb 22, 2021 · 1 comment
Open

[Bug] Types that require conversion don't work in OnPlatform #13830

mattleibow opened this issue Feb 22, 2021 · 1 comment

Comments

@mattleibow
Copy link
Contributor

mattleibow commented Feb 22, 2021

Description

I can't use NamedSize as a font size:

<Label x:Name="label0">
    <Label.FontSize>
        <OnPlatform x:TypeArguments="NamedSize">
            <On Platform="Android" Value="Large" />
            <On Platform="UWP" Value="Large" />
            <On Platform="iOS" Value="Large" />
        </OnPlatform>
    </Label.FontSize>
</Label>

Steps to Reproduce

  1. Use the snippet above
  2. Observe the error

Expected Behavior

The values convert from my string into a double value for the property.

Actual Behavior

I get an error:

XLS0504	Property 'FontSize' does not support values of type 'OnPlatform`1 (T)'.

or

XamlC error XFC0009: No property, BindableProperty, or event found for "FontSize", or mismatching type between value and property.

Basic Information

  • Version with issue:
  • Last known good version:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library / AndroidX Version:
  • NuGet Packages:
  • Affected Devices:

Environment

Show/Hide Visual Studio info

Build Logs

Screenshots

Reproduction Link

Workaround

@mattleibow mattleibow added t/bug 🐛 s/unverified New report that has yet to be verified labels Feb 22, 2021
@mattleibow mattleibow mentioned this issue Feb 22, 2021
2 tasks
@samhouts samhouts added this to New in Triage Feb 22, 2021
@mattleibow mattleibow modified the milestone: .NET MAUI Feb 22, 2021
@mattleibow mattleibow removed this from New in Triage Feb 22, 2021
@mattleibow mattleibow added this to To Do in .NET MAUI (P2) Feb 22, 2021
@Tommigun1980
Copy link

If you guys take a sprint on named sizes I’ve got two more here:
#13626
#13628

@mattleibow mattleibow added this to New in Triage via automation Feb 22, 2021
@mattleibow mattleibow removed this from To Do in .NET MAUI (P2) Feb 22, 2021
@jsuarezruiz jsuarezruiz moved this from New to Needs Estimate in Triage Feb 23, 2021
@jsuarezruiz jsuarezruiz removed the s/unverified New report that has yet to be verified label Feb 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Triage
  
Needs Estimate
Development

No branches or pull requests

3 participants