[forms-devel] Expression Trees

Jason Smith jason.smith at xamarin.com
Mon May 9 06:09:56 UTC 2016


The other methods will be obsoleted as soon as suitable replacements are
devised.

On Sat, May 7, 2016 at 4:51 AM, Michael Rumpler <michael at mrumpler.at> wrote:

> Hi,
>
>
>
> the generic version of BindableProperty.Create has been obsoleted a few
> versions back. I didn't understand the exact cause, but it seems like the
> used expression tree raised the app size and did not perform well on iOS.
>
>
>
> As some others also expressed I think this is a step back and I wonder if
> you could do something similar as Fody (
> https://github.com/Fody/PropertyChanged). They rewrite the IL to inject
> the INotifyPropertyChanged code into the assembly at compile time. Maybe
> you could also do that and rewrite the expression tree to a simple string
> during compilation. This way the developers could still use the more
> friendly and much shorter generic version of that method.
>
>
>
> However if that's not possible, then I wonder why the other uses of
> expression trees are still in XF and not obsoleted.
>
>
>
>                BindableObjectExtensions.SetBinding<TSource>(this
> BindableObject self, BindableProperty targetProperty,
> Expression<Func<TSource, object>> sourceProperty, BindingMode mode =
> BindingMode.Default,
>
>
>    IValueConverter converter = null, string stringFormat = null)
>
>                Binding.Create<TSource>(Expression<Func<TSource, object>>
> propertyGetter, BindingMode mode = BindingMode.Default, IValueConverter
> converter = null, object converterParameter = null,
>
>
>   string stringFormat = null)
>
>                BoundsConstraint.FromExpression(Expression<Func<Rectangle>>
> expression, IEnumerable<View> parents = null)
>
>                Constraint.FromExpression(Expression<Func<double>>
> expression)
>
>                IRelativeList.Add(T view, Expression<Func<Rectangle>>
> bounds)
>
>                IRelativeList.Add(T view, Expression<Func<double>> x =
> null, Expression<Func<double>> y = null, Expression<Func<double>> width =
> null, Expression<Func<double>> height = null)
>
>
>
> Cheers,
>
> Michael
>
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7596 / Virus Database: 4565/12182 - Release Date: 05/07/16
>
> _______________________________________________
> forms-devel mailing list
> forms-devel at lists.xamarin.com
> http://lists.ximian.com/mailman/listinfo/forms-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/forms-devel/attachments/20160508/e321fb16/attachment.html>


More information about the forms-devel mailing list