Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Thoughts about a OnPlatform shorthand

$
0
0

Hi!

I miss a shorthand in Xamarin Forms XAML for OnPlatform. Consider this:

<ColumnDefinition>
    <ColumnDefinition.Width>
        <OnPlatform x:TypeArguments="GridLength" iOS="3" Android="15" WinPhone="15" />
    </ColumnDefinition.Width>
</ColumnDefinition>

I would like to write

<ColumnDefinition Width="3;15;15" /> 

Or perhaps a more verbose version

 <ColumnDefinition Width="iOS=3;Android=15;WinPhone=15" /> 

My personal option is that it would improve readability and reduce XAML-bloat. However, I would want to request a feature without knowing what every one else feels like.

Any thoughts?

Best regards

Johan

EDIT: Fixed typo


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>