Xamarin.Forms 5 Preview: Advanced UI Controls for Beautiful Apps
Xamarin.Forms 5 brings to stable release features that you have seen in preview over the latest several 4.x releases. This includes solid and gradient
SwipeView. These new features inject new creative potential for your application designs to create beautiful, interactive experiences.
Let’s look at those highlights, and then a quick checklist of what you should review as you get started with the Xamarin.Forms 5 pre-release.
Beautiful Design with Brushes, Shapes, and Paths
With brushes you can now easily paint gradients anywhere you need them. Shapes and paths allow you to draw all the rounded corners and even oddly shaped parts of your UI by using the platform graphics APIs which adds no size to your final applications. You can use geometries to clip any visual element, which makes it very easy to get the highly sought-after circle image.
Any UI with Templating
RadioButton isn’t perhaps the most exciting form control, its use of control templating to radically alter the look of the design foreshadows where we can take control extensibility in future iterations. The
RadioButton control now takes any content so you can completely control the look and behavior of the control. In its most simple usage, you can provide just text (left image), and in more advanced usage add a control template (right image) to match a Fluent UI design.
More Interactive Controls with CarouselView, SwipeView, and Drag-and-drop
CarouselView supports control of the looping, supports various visual states to transform the
DefaultItem with VisualStateManager.
PeekAreaInsets can be used to set how much of the previous and next items should encroach on the current item in view. It also includes an
EmptyView, a property to attach an
IndicatorView, and so much more. For details on how to use these features and others, visit the CarouselView documentation.
SwipeView wraps any control and layout to add contextual buttons and commands like you might see in a list. Drag-and-drop gestures allow you to add that gesture to any UI view and control what can accept the drop, whether inside the application, or outside. This is especially useful on the Surface Duo when you have two apps open.
Thank You Reviewers
This release also included several community reviewers that played a significant role in helping us get through so many bug fixes and enhancements for this release. Code contributors are always celebrated, and these community members have gone the additional step to help make sure those contributions make it more quickly into the product. Join us in celebrating these awesome individuals!
- Sia Ghassemi (@dersia_)
- Felipe Baltazar (@felipebaltazar)
- Kangho Hur (@rookiejava)
- Mohamed CHOUCHANE (@mohachouch)
- Nick Randolph (@nickrandolph)
- Pedro Jesus (@pictos)
- Rafael Rivera (@riverar)
- Vladislav Antonyuk (@VladislavAntonyuk)
Interested in participating? Join us on the .NET Discord in the #xamarin-forms channel.
Getting Ready for Xamarin.Forms 5
As you look at upgrading your applications to Xamarin.Forms 5, there are some changes and removals to be aware of first. For a complete list, review the release notes. Most notably:
- Visual Studio 2019 is the minimum version to use
MasterDetailPageand properties have been renamed
UIWebViewhas been removed to address Apple restrictions
Expanderhave been moved to the Xamarin Community Toolkit. C# UI is to follow.
- (Preview) DataPages and Theme packages have been removed from the NuGet release
For more details on these changes visit the release notes.
Please take a few minutes to safely branch and upgrade your projects to this pre-release of Xamarin.Forms 5, and let us know what needs attention by reporting an issue on GitHub.
Browse the awesome documentation for all of the great new features in Xamarin.Forms 5: