maui
maui copied to clipboard
[xamlc] fix compiled {OnPlatform}
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
/azp run
Azure Pipelines successfully started running 2 pipeline(s).