Third alpha version of Perspex UI Framework with iOS / Android support
We are pleased to present the third alpha version of Perspex (see previous announcement ). Perspex is an open source, cross-platform UI framework for .NET, made in the image of WPF, with XAML, bindings, control templates, own rendering system and other buns.
This release adds initial support for iOS and Android platforms, improves designer and XAML, fixes many bugs.
')
List of changes under the cut.
iOS / Android
Using our new backend in C ++ based on Skia, it became possible to use a single drawing code for all platforms (except WinRT, but the current Direct2D backend should start there), which made it possible to quickly port to mobile platforms. Currently, support is only at the basic level (see video), there is no multi-windowing, pop-ups, text input does not work on iOS, and gestures are converted into mouse events, but we are working on it. Using the native backend will allow you to build for Android without using Xamarin by using libmono and NativeActivity. Since iOS is a bit more complicated, the LGPL-license does not allow using Mono-runtime, so you have to wait for the launch on iOS coreclr.
XAML
In the previous version, the XAML binders were a bit buggy, in this version a lot of work has been done on them, which allows them to be used very confidently. Partial support for MultiBinding (so far only in one direction), several extensions have been added to standard binders:
Auto-completion support for attached-properties and markup extensions
Support for clr-namespace, which allows you to get auto-completion for your controls (just do not forget to re-compile, metadata is currently read only from dll-ok)
Design.DataContext , Design.Width , Design.Height , so now you can use mocks models and see how this happiness will look right in the designer (use the Static markup extension for this purpose)
"Direct" properties
PerspexProperty , as well as WPF's DependencyProperty , is a heavyweight thing, so we added support to turn ordinary properties into something that can be bind to. It looks like this:
publicstaticreadonly PerspexProperty<bool> IsFocusedProperty = PerspexProperty.RegisterDirect<InputElement, bool>("IsFocused", o => o.IsFocused); publicbool IsFocused { get { return _isFocused; } set { SetAndRaise(IsFocusedProperty, ref _isFocused, value); } }
What gives support for this property in the implementation of INotifyPropertyChanged and GetObservable .
The framework is developing rapidly, but it is still alpha, so there are a bunch of bugs of all colors and colors, performance problems that nobody has really dealt with, memory can leak in places, that's all. If you find any of the above, please start an issue on the githaba . Currently, the main suppliers of bug reports are the authors of the Core2D and IDE diagram editor for the VitalElement Studio embedded systems, trying to port their applications from WPF to Perspex.
The author of Core2D has made some progress in this field. I think by the end of winter we will roll out the beta, which can be considered something ready for use in small applications. With questions, you can contact me and in our cozy chat on Gitter (in chat, despite the coziness, only English).
GitHub Repository Chat in Gitter (in English) Packages in Nuget: Perspex, Perspex.Desktop, Perspex.Android, Perspex.iOS Night Build NuGet Feed: www.myget.org/F/perspex-nightly/api/v2/Packages