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

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

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.

https://msdn.microsoft.com/en-us/library/system.windows.data.binding%28v=vs.110%29.aspx

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...