[forms-devel] Windows Center Crop & Aspect = None

Jason Smith jason.smith at xamarin.com
Mon May 23 17:14:19 UTC 2016


Hi Adam,

The Aspect.None idea will need to go through the Evolution process, however
the way the enum is currently defined will require an ABI break to really
do things correctly.

Aspect.AspectFit currently == 0. Really Aspect.None should == 0, however
doing so would be an ABI break. I am not sure what the right move here is,
but there are third parties using this so this kind of break is probably
unacceptable.

Due to this I suspect this proposal is dead in the water.

Jason

On Mon, May 16, 2016 at 8:25 PM, Adam Pedley <adam.pedley at gmail.com> wrote:

> Following on from Issue 10 - TL;DR; can this change be made as a PR or
> must some breaking change protection be added - . Just revising my previous
> code as I forgot to accommodate Vertical.
>
>   void UpdateAspect() { Control.Stretch = GetStretch(Element.Aspect); if
> (Element.Aspect == Aspect.AspectFill) {
> // To match center crop on Android/iOS ImageRenderer
> Control.HorizontalAlignment = HorizontalAlignment.Center;
> Control.VerticalAlignment = VerticalAlignment.Center; } else {
> Control.HorizontalAlignment = HorizontalAlignment.Left; // Default
> Control.VerticalAlignment = VerticalAlignment.Top; } }
>
> Second issue is why does Xamarin Forms not have Aspect=None, which would
> be translated per platform to:
>
> Windows = None
> Android = Matrix
> iOS = TopLeft
>
> Can this be added in a PR or was there a reason for omitting it originally?
>
> _______________________________________________
> 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/20160523/abcca608/attachment.html>


More information about the forms-devel mailing list