-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[XSG] NaN value in XAML generates invalid code #33532
Copy link
Copy link
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorsplatform/androidplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't workingxsgXaml sourceGenXaml sourceGen
Milestone
Metadata
Metadata
Assignees
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorsplatform/androidplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't workingxsgXaml sourceGenXaml sourceGen
Type
Fields
Give feedbackNo fields configured for Bug.
Description
When a XAML file contains
NaNas a value (e.g.,Padding="NaN"), the XAML Source Generator generates invalid C# code using bareNaNinstead ofdouble.NaN.Steps to Reproduce
Expected Behavior
Generated code should use
double.NaN:Actual Behavior
Generated code uses bare
NaN:This results in:
Affected File
src/Controls/samples/Controls.Sample/Pages/Controls/ButtonPage.xamlline 196Workaround
Set the file to use Runtime inflator: