Uno Platform 2.1 available now – x:Bind, TwoPaneView and more
Tags: news, android, ios, webassembly
Published: 2020-04-09 16:47:42

---
title: Uno Platform 2.1 available now – x:Bind, TwoPaneView and more
published: true
date: 2020-04-07 12:45:48 UTC
tags: News,Android,iOS,WASM
canonical_url: https://platform.uno/blog/uno-platform-2-1-available-now-xbind-dualpaneview-and-more/
---

Uno Platform 2.1 release is packed with over 50 new features allowing for increased productivity as well as getting you up and running with Surface Duo. In addition to bigger milestones such as x:Bind, the TwoPaneView and NumberBox controls we also shipped another 50 new features and closed 45 issues you raised. Without further ado:

![](https://s3.amazonaws.com/uno-website-assets/wp-content/uploads/2020/04/06131312/Header_Uno_banners_2.1_is_available-03-1.png)

## x:Bind functions

Uno has been supporting some form of [x:Bind markup](https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/x-bind-markup-extension) for properties, binding to functions were a big ask from users of Uno, as it allows for invoking methods from code behind very easily.

Two of the largest use of x:Bind functions is to reduce the use of converters, and the use of static properties. Another use of the x:Bind is familiar to WPF developers, where binding to multiple properties is also available.

You’ll find below some examples of the x:Bind feature.

Member Function, to make a string upper case:

```
<TextBlock Text="{x:Bind MyProperty.ToUpper()}" />
```

Static type fields or properties OneTime binding:

```
<TextBlock Text="{x:Bind local:StaticType.PropertyIntValue}" />
```

OneWay local member function with multiple observable parameters:

```
<TextBlock Text="{x:Bind Multiply(slider1.Value, slider2.Value), Mode=OneWay}" />
```

Literal boolean parameters:

```
<TextBlock Text="{x:Bind BoolFunc(x:False)}" />
```

Literal numeric value:

```
<TextBlock Text="{x:Bind Add(InstanceProperty, 42.42)}" />
```

Use of system functions such as:

```
<TextBlock Text="{x:Bind sys:String.Format('Formatted {0}', MyProperty), Mode=OneWay}" />
```

Which also works with multi parameters formatting:

```
<TextBlock Text="{x:Bind sys:String.Format(x:Null, 'slider1: {0}, slider2:{1}', slider1.Value, slider2.Value), Mode=OneWay}" />
```

Or DateTime parsing:

```
<CalendarDatePicker Date="{x:Bind sys:DateTime.Parse(TextBlock1.Text)}" />
```

Uno also supports two-way BindBack:

```
<TextBlock Text="{x:Bind sys:String.Format('{0}', MyInteger), BindBack=BindBackMyInteger, Mode=TwoWay}" />
```

where this method is available in the control:

```
public void BindBackMyInteger(string text){ MyInteger = int.Parse(text);}
```

The Uno docs site provides a more [detailed documentation](https://platform.uno/docs/articles/features/windows-ui-xaml-xbind.html) on this feature.

## Surface Duo and WinUI TwoPaneView

The WinUI 2.3 TwoPaneView is a Windows 10 specific control provides the ability to layout content in two panes. It behaves like a dual ContentControl, based on a set of parameters such as Pane length, tall and wide configuration modes and pane priorities to display content based on the available window space.

We have ported TwoPaneView so you are able to use it with Surface Duo. You can see much more about [TwoPaneView at the blog dedicated to it](https://platform.uno/blog/surface-duo-winui-twopaneview-implementation-via-uno-platform/).

## WinUI 2.3 NumberBox

The [NumberBox](https://docs.microsoft.com/en-us/uwp/api/microsoft.ui.xaml.controls.numberbox?view=winui-2.3) control is a very powerful control that the WinUI team created, which we ported it over to Uno. It supports lots of modes, with min and max values, steps, as well as the ability to enter quick expressions:

![](https://s3.amazonaws.com/uno-website-assets/wp-content/uploads/2020/04/06130706/20200112-number-box-repeat.gif)

## Other significant updates

You’ll find the complete list of changes [in the release notes over on GitHub](https://github.com/unoplatform/uno/releases/tag/2.1.37) releases, as the support for Grid.ColumnSpacing and Grid.RowSpacing, multitouch pointers support, support for UIElement.RightTapped and Holding.

Thanks to [Morten Nielsen](https://twitter.com/dotMorten), the support for templates tags in the Visual Studio 2019 wizard has been added, to make it easier to discover the templates:

![](https://s3.amazonaws.com/uno-website-assets/wp-content/uploads/2020/04/06124856/morten.png)

Thank you to all our contributors for the hard work they’re putting into improving Uno !

# 

# 

# 

# Next Steps

We are already working on 2.2 release and we hope to ship it within next 45 days. In the meantime, if you find issues, please let us know by [opening one here](https://github.com/unoplatform/uno/issues/new/choose).

If you are new to the Uno Platform, you may want to run through the [Getting Started tutorial](https://platform.uno/docs/articles/getting-started-tutorial-1.html). This will ensure you have the correct environment set up and that you have the latest release of Uno. If you have already worked with Uno, you may want to update your Uno package via your Visual Studio NuGet package manager.

Jerome Laban, on behalf of Uno Platform team

The post [Uno Platform 2.1 available now – x:Bind, TwoPaneView and more](https://platform.uno/blog/uno-platform-2-1-available-now-xbind-dualpaneview-and-more/) appeared first on [Uno Platform](https://platform.uno).