[forms-devel] forms-devel Digest, Vol 1, Issue 9

Adam Pedley adam.pedley at gmail.com
Tue May 17 02:16:32 UTC 2016


In Windows when you do an AspectFill on an image it fills the screen but is
left aligned.

On iOS and Android it does a Center Crop.

My proposed solution to bring windows in alignment is to change the
UpdateAspect function in the Windows ImageRenderer with

               void UpdateAspect()
{
Control.Stretch = GetStretch(Element.Aspect);
                        if (Element.Aspect == Aspect.AspectFill)
                             Control.HorizontalAlignment =
HorizontalAlignment.Center; // To match center crop on Android/iOS
ImageRenderer
                        else
                             Control.HorizontalAlignment =
HorizontalAlignment.Left; // Default
}

However this would be a breaking change to people who might have relied
upon the previous default left alignment.

Would this be ok for a PR? or must we implement something else to avoid a
possible minor breaking change?



On Tue, May 10, 2016 at 12:29 AM, <forms-devel-request at lists.xamarin.com>
wrote:

> Send forms-devel mailing list submissions to
>         forms-devel at lists.xamarin.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.ximian.com/mailman/listinfo/forms-devel
> or, via email, send a message with subject or body 'help' to
>         forms-devel-request at lists.xamarin.com
>
> You can reach the person managing the list at
>         forms-devel-owner at lists.xamarin.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of forms-devel digest..."
>
>
> Today's Topics:
>
>    1. Re: Offer to extend Frame and add SegmentedButtonGroup
>       (Rui Marinho)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 9 May 2016 14:14:27 +0000
> From: Rui Marinho <v-rumar at microsoft.com>
> To: Jason Smith <jason.smith at xamarin.com>
> Cc: "forms-devel at lists.xamarin.com" <forms-devel at lists.xamarin.com>
> Subject: Re: [forms-devel] Offer to extend Frame and add
>         SegmentedButtonGroup
> Message-ID: <3B0F27C4-C865-4A24-B6DF-A0F90CB1A3C0 at microsoft.com>
> Content-Type: text/plain; charset="us-ascii"
>
> I like the frame additions,
>
> We could introduce a concept of GroupButton (drop the Segmented part),
> that would be more easy to distinguish of the native iOS implementation.
>
> On 09 May 2016, at 14:59, Jason Smith <jason.smith at xamarin.com<mailto:
> jason.smith at xamarin.com>> wrote:
>
>
> Oh yes of course we would on iOS, however there are no native controls I
> am aware of on other platforms, hence why we never added such a control in
> the past.
>
> On May 9, 2016 6:55 AM, "Miguel de Icaza" <miguel at xamarin.com<mailto:
> miguel at xamarin.com>> wrote:
> Hello,
>
> Shouldn't we try to use the native controls for this when available?
>
> miguel.
>
> On Mon, May 9, 2016 at 2:44 AM, Michael Ridland <rid00z at gmail.com<mailto:
> rid00z at gmail.com>>wrote:
>
> The SegmentedButtonGroup would not have native renderers it would be
> composed of Xamarin.Forms views.
>
> Thanks
>
> Michael Ridland | Technical Director | Xamarin MVP
> XAM Consulting - Mobile Technology Specialists
> www.xam-consulting.com<
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.xam-consulting.com%2f&data=01%7c01%7cv-rumar%40microsoft.com%7ce79a0199470a43762f5208d3781219c4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=2a7efLLakvM2lbVYKWnKlwwFjX2Gps7yqiak6Oflzuo%3d
> >
> Blog: www.michaelridland.com<
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.michaelridland.com&data=01%7c01%7cv-rumar%40microsoft.com%7ce79a0199470a43762f5208d3781219c4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=PufeIOw3I8sGZ8EFpJXeKGRIg%2bqhKet9ALQ2lOEtHTU%3d
> >
>
>
> On Mon, May 9, 2016 at 4:41 PM, Michael Ridland <rid00z at gmail.com<mailto:
> rid00z at gmail.com>>wrote:
>
> With those colors and radius it looks like a iOS control but it's not
> necessarily for iOS only. Most likely colors and radius would be within the
> design of the app anyway, with a dark theme it would be dark and light
> theme it would be light.
>
> <Screen Shot 2016-05-09 at 4.40.33 PM.png>
>
>
>
> Michael Ridland | Technical Director | Xamarin MVP
> XAM Consulting - Mobile Technology Specialists
> www.xam-consulting.com<
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.xam-consulting.com%2f&data=01%7c01%7cv-rumar%40microsoft.com%7ce79a0199470a43762f5208d3781219c4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=2a7efLLakvM2lbVYKWnKlwwFjX2Gps7yqiak6Oflzuo%3d
> >
> Blog: www.michaelridland.com<
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.michaelridland.com&data=01%7c01%7cv-rumar%40microsoft.com%7ce79a0199470a43762f5208d3781219c4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=PufeIOw3I8sGZ8EFpJXeKGRIg%2bqhKet9ALQ2lOEtHTU%3d
> >
>
>
> On Mon, May 9, 2016 at 4:11 PM, Jason Smith <jason.smith at xamarin.com
> <mailto:jason.smith at xamarin.com>> wrote:
> Hi Michael,
>
> The frame corner properties seems fine, please submit a spec to the
> Xamarin Evolution repo.
>
> The segmented button group is nice but how should it look on non-iOS
> platforms?
>
> Jason
>
> On Sun, May 8, 2016 at 10:30 PM, Michael Ridland <rid00z at gmail.com<mailto:
> rid00z at gmail.com>> wrote:
> Hi
>
> I'm making an offer to implement two features in the Forms codebase, as
> per below. I'm happy to change spec based on feedback.
>
> Extending the Frame to have two new properties.
>
> Corners - a enum { All, TopLeft, TopRight, BottomLeft, BottomRight, None }
> CornerRadius - float with a radius for the corner
>
> Adding this feature to the Frame is a great building block for more
> advanced UI and controls.
>
> Add new control SegmentedButtonGroup
>
> Based on the new features of the Frame I can build a segmented button
> group control.
>
> <SegmentedButtonGroup OnColor="Blue" OffColor="White"
> SelectedIndex="{Binding SelectIndex, Mode=TwoWay}">
>     <SegmentedButtonGroup.SegmentedButtons>
>         <SegmentedButton Title="Button 1"/>
>         <SegmentedButton Title="Button 2"/>
>         <SegmentedButton Title="Button 3"/>
>     </SegmentedButtonGroup.SegmentedButtons>
> </SegmentedButtonGroup>
>
> <image.png>
>
> This control is very useful and commonly used in modern apps, not to
> mention many designers are using it these days.
>
> Thanks
>
>
> Michael Ridland | Technical Director | Xamarin MVP
> XAM Consulting - Mobile Technology Specialists
> www.xam-consulting.com<
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.xam-consulting.com%2f&data=01%7c01%7cv-rumar%40microsoft.com%7ce79a0199470a43762f5208d3781219c4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=2a7efLLakvM2lbVYKWnKlwwFjX2Gps7yqiak6Oflzuo%3d
> >
> Blog: www.michaelridland.com<
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fwww.michaelridland.com&data=01%7c01%7cv-rumar%40microsoft.com%7ce79a0199470a43762f5208d3781219c4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=PufeIOw3I8sGZ8EFpJXeKGRIg%2bqhKet9ALQ2lOEtHTU%3d
> >
>
>
> _______________________________________________
> forms-devel mailing list
> forms-devel at lists.xamarin.com<mailto:forms-devel at lists.xamarin.com>
> http://lists.ximian.com/mailman/listinfo/forms-devel<
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2flists.ximian.com%2fmailman%2flistinfo%2fforms-devel&data=01%7c01%7cv-rumar%40microsoft.com%7ce79a0199470a43762f5208d3781219c4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=sdVaJ1WcyCuAW6dschQ8LgEjinlLGwkhTLghu0%2fOt%2b4%3d
> >
>
>
>
>
>
> _______________________________________________
> forms-devel mailing list
> forms-devel at lists.xamarin.com<mailto:forms-devel at lists.xamarin.com>
> http://lists.ximian.com/mailman/listinfo/forms-devel<
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2flists.ximian.com%2fmailman%2flistinfo%2fforms-devel&data=01%7c01%7cv-rumar%40microsoft.com%7ce79a0199470a43762f5208d3781219c4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=sdVaJ1WcyCuAW6dschQ8LgEjinlLGwkhTLghu0%2fOt%2b4%3d
> >
>
>
>
> _______________________________________________
> forms-devel mailing list
> forms-devel at lists.xamarin.com<mailto:forms-devel at lists.xamarin.com>
> http://lists.ximian.com/mailman/listinfo/forms-devel<
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2flists.ximian.com%2fmailman%2flistinfo%2fforms-devel&data=01%7c01%7cv-rumar%40microsoft.com%7ce79a0199470a43762f5208d3781219c4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=sdVaJ1WcyCuAW6dschQ8LgEjinlLGwkhTLghu0%2fOt%2b4%3d
> >
>
> _______________________________________________
> forms-devel mailing list
> forms-devel at lists.xamarin.com<mailto:forms-devel at lists.xamarin.com>
>
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2flists.ximian.com%2fmailman%2flistinfo%2fforms-devel&data=01%7c01%7cv-rumar%40microsoft.com%7ce79a0199470a43762f5208d3781219c4%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=sdVaJ1WcyCuAW6dschQ8LgEjinlLGwkhTLghu0%2fOt%2b4%3d
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.ximian.com/pipermail/forms-devel/attachments/20160509/9a4a2e51/attachment.html
> >
>
> ------------------------------
>
> _______________________________________________
> forms-devel mailing list
> forms-devel at lists.xamarin.com
> http://lists.ximian.com/mailman/listinfo/forms-devel
>
>
> End of forms-devel Digest, Vol 1, Issue 9
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/forms-devel/attachments/20160517/a78a46d5/attachment-0001.html>


More information about the forms-devel mailing list