maui icon indicating copy to clipboard operation
maui copied to clipboard

[xamlc] fix compiled {OnPlatform}

Open jonathanpeppers opened this issue 3 years ago • 2 comments

A customer's project was doing:

{OnPlatform foo, iOS=bar}

When compiling with dotnet build -f net6.0-android -c Release.

The value foo was not set!

However, either of these combinations work fine:

{OnPlatform Default=foo, iOS=bar}
{OnPlatform Android=foo, iOS=bar}

It appears we are missing the case for the [ContentProperty] for the {OnPlatform} markup extension.

I added tests cases for this, and solved the problem by using node.CollectionItems[0] to get the actual value.

I think this is the right approach?

Issues Fixed

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1584968

jonathanpeppers avatar Aug 04 '22 22:08 jonathanpeppers

/azp run

PureWeen avatar Aug 09 '22 21:08 PureWeen

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar Aug 09 '22 21:08 azure-pipelines[bot]