BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Standardizes XAML across UWP and Xamarin

Microsoft Standardizes XAML across UWP and Xamarin

This item in japanese

Bookmarks

Announced during BUILD 2017, Microsoft has made public the first draft of the XAML Standard, a markup dialect meant to unify how user interface elements are defined.

Microsoft wants to unify some of the existing XAML dialects, planning to create version 1.0 some time later this year. After that, they plan on enhancing UWP and Xamarin.Forms to support the standard, making it possible to share UI definitions between the frameworks.

The draft proposes the following controls so far: Button, TextBlock, TextBox, ComboBox, Grid, StackPanel, Page, UserControl, all including a number of properties such as Margin, HorizontalAlignment, VerticalAlignment, Height, Width, and some controls supporting several font properties. These will not be all the controls supported by the standard, a good number of other controls and properties being asked for and approved in the project’s issues, such as Image, Border, WebView, Slider, ProgressBar, and others. It seems based on the name of the controls suggested so far that XAML/UWP will be used as reference and not the dialect used by Xamarin.

Microsoft says that developers can continue to create UWP and Xamarin.Forms applications as they have done so far, and later they "will be able to reuse and share between the frameworks and expand into more platforms," adding:

Nothing changes for existing developers – you can continue to use the same APIs you have always used in both frameworks. XAML Standard will help you reuse/share any common UI code that you wish to share between end points.

Currently, the standard’s review board is made of representatives of the UWP and Xamarin.Forms XAML teams, but in the future they plan to expand the board if new implementers of the standard appear, adding though that "not every XAML API needs to be part of the XAML Standard." One important technology that uses XAML is WPF. Morten Nielsen, a .NET developer who participated at the BUILD Friday Q&A, asked Kevin Gallo, VP of Windows Developer Platform at Microsoft, what their plans regarding WPF are. According to Nielsen, Gallo said "they do not intend to crack open WPF to add new XAML Standard capabilities." Nielsen added "I think this is as close as a "WPF is Dead" statement as you'll get." Another developer, Bastian Schmidt, said on the same topic "If Microsoft decides to exclude WPF from the standard it's a must for Microsoft to release an official statement declaring WPF dead."

A possible solution was mentioned by Shaun Tonstad who said they converted WPF apps to UWP and they do not need the standard to support WPF:

We went through the effort of converting WPF and Silverlight apps to UWP. While WPF support would be nice, I wouldn't want to see this compatibility effort taken on if it impedes availability of cross-platform XAML via UWP. Regardless of how you feel about WPF, UWP is here to stay and it only seems natural to have it be a starting point for cross-platform interop.

Until Microsoft declares WPF dead, if they will ever do that, the XAML Standard remains a step forward, unifying the language used to define the user interfaces of applications across UWP and Xamarin.Forms, the latter being used to create applications on iOS, Android and Windows Phone.

Rate this Article

Adoption
Style

BT