Bug 33418 - Make Xamarin.Forms.Binding class not sealed
Summary: Make Xamarin.Forms.Binding class not sealed
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: PC Windows
: Normal enhancement
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-08-27 08:31 UTC by n.podbielski
Modified: 2016-04-28 08:21 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:





Related Links:

Description n.podbielski 2015-08-27 08:31:52 UTC
Honestly I can not think of reason that makes this necessary from user perspective. 
Microsoft in WPF framework allows for inheritance from Binding class just fine.


Why Xamarin do no allow for that?
Why this is necessary?
I.e. if I want to bind drop down control to enum type values there is not easy way to do this. I do not like making ViewModel properties every time I want to get enum possible values. After all there may be need for list of possible value for some particular enum in multiple views. Why to write the same thing multiple times? To achieve this I use binding like this:

ItemsSource="{Binding Converter={StaticResource EnumToListConverter}, 
                      ConverterParameter={x:Static system:String.Empty},
                      Source={x:Type custom:Producer}}"

But this is still copy paste mostly. With possibility to inherit from Binding it would be viable to just create EnumTypeBinding that takes type as parameter or something similar.

Another minus of sealed Binding class is that there is not easy way to make binding from Entry control text to other types (int i.e.). Of course we can create converter StringToIntConverter. But again it force me to copy paste the same binding in many locations. Or I can create new control. But this is most cases unnecessary and can force user to create additional styles and IMHO is much more complicated for inexperienced users.

Maybe there is some architectural problems with sealed Binding (I can't think of one) but IMHO it creates more problems that it solve.
Comment 1 n.podbielski 2015-09-02 02:50:21 UTC
What 'needinfo' status means? Do you need more info from me?
Comment 2 Paul DiPietro [MSFT] 2016-04-13 18:57:53 UTC
This is not on our roadmap.
Comment 3 n.podbielski 2016-04-28 08:21:18 UTC
Yes. Make things easier for your user is not on 'roadmap'. Ok... got it...