BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Xamarin Forms 5.0 Stabilizes New Graphic and Interactive Features

Xamarin Forms 5.0 Stabilizes New Graphic and Interactive Features

This item in japanese

Xamarin Forms 5.0 is a major new release of Xamarin open-source framework to create cross-platforms UI for iOS, Android, and Windows. It stabilizes a number of new features such as Brushes, Shapes and Paths, CarouselView, drag and drop, and more.

Based on the underlying OS graphics APIs, Brushes along with Shapes and Paths aim to make it easier to create visually richer UIs that include color gradients and arbitrarily shaped parts. Brushes come in three variants: solid colors, linear gradients, and radial gradients. Shapes and paths on the other hand can be ellipses, lines, polygons, polylines, and rectangles.

Drag-and-drop, CarouselView, and SwipeView enable the creation of richer interactive controls. Using Xamarin Forms 5 you can finally drag UI elements from their location on screen and drop them on a new one. A CarouselView makes it possible to display a collection of items through a scrollable layout, which can have horizontal or vertical orientation. A SwipeView is a container that responds to a swipe gesture on a UI element to display a list of items, such as when swiping on table row to show which actions are available for that row.

Drag-and-drop works both within the same application or between two applications. For basic UI elements such as labels, buttons, entry fields and so on, Xamarin Forms will automatically create an associated data package that represents the item state. For other UI elements, the developer is responsible for creating a proper data package so the data associated with the element can be also transferred.

Xamarin Forms SwipeView supports a number of layout and behavioural options, including which elements are activated by a left, right, top, or bottom swipe; which swipe directions are handled; whether the swipe only reveals which actions are available or executes them; if the swipe view remains open after an action is invoked, and so on.

As a final note, Radio buttons have been extended in Xamarin Forms 5 to behave as a container of any kind of UI elements which standard radio controls are attached to. Additionally, Xamarin Forms also stabilizes App Themes to enable light and dark mode and themed apps.

To better understand how the new features can be used, check out the sample projects that the Xamarin team has developed, including Xappy, Los Gatos, Drag and Drop, and Fly Me.

Rate this Article

Adoption
Style

BT