Xamarincommunitytoolkit: [Proposal] Converters

Created on 29 May 2020  路  3Comments  路  Source: xamarin/XamarinCommunityToolkit

Feature Request:

From the thread here it seems like people have some converters that they use all the time. Let's come up with some of the most basic/most wanted and get them in.

From the thread:

(More) examples: https://github.com/DIPSAS/DIPS.Xamarin.UI/tree/master/src/DIPS.Xamarin.UI/Converters/ValueConverters

converters in-progress proposal

Most helpful comment

I think that converters should implement IMarkupExtension to make them more accessible from XAML and the consumer would not have to add it to their resources for every page. It also enables you to pass properties, like a bool Inverted to invert it.

Here is a couple of converters we are using in our apps :
https://github.com/DIPSAS/DIPS.Xamarin.UI/wiki/Converters

Source link :
https://github.com/DIPSAS/DIPS.Xamarin.UI/tree/master/src/DIPS.Xamarin.UI/Converters/ValueConverters

All 3 comments

I like this proposal... and if I can be so bold, I think Pedro Lamas could be a prime candidate to do a big PR for a lot of them.
His Cimbalino toolkit ( https://github.com/Cimbalino/Cimbalino-Toolkit/tree/master/src/Cimbalino.Toolkit%20(WP8)/Converters ) contains a huge list that were very relevant for Windows Phone and UWP.
I know he was looking at Xamarin when it came into Microsoft, but never got around it... but much of the converters are platform agnostic.

I think that converters should implement IMarkupExtension to make them more accessible from XAML and the consumer would not have to add it to their resources for every page. It also enables you to pass properties, like a bool Inverted to invert it.

Here is a couple of converters we are using in our apps :
https://github.com/DIPSAS/DIPS.Xamarin.UI/wiki/Converters

Source link :
https://github.com/DIPSAS/DIPS.Xamarin.UI/tree/master/src/DIPS.Xamarin.UI/Converters/ValueConverters

OK, I think we got a lot of these in now. From here on out let's see what people come up with before we stuff more in.

Was this page helpful?
0 / 5 - 0 ratings