Andrew Hoefling

Speaker | Mentor | Coder | Leader

When building cross-platform apps using Uno Platform it is a common technique to use the Model-View-ViewModel (MVVM) architecture. This is a way to separate out your User Interface logic from the business rules that power the page. A ViewModel is a special class that provides data binding to the View. Many MVVM frameworks provide a pre-built ViewModelLocator. This article goes over how to build a custom ViewModelLocator for your project.

When implementing a Model-View-ViewModel (MVVM) pattern in Uno Platform projects is similar to any other XAML Page based toolchain such as WPF and Xamarin.Forms for example. You unlock the power of MVVM once you implement a Dependency Injection solution as it simplifies all of your ViewModel dependencies. Microsoft has a great community library for Dependency Injection called Microsoft.Extensions.DependencyInjection.

When building cross-platform apps using Uno Platform it is a common problem to run platform specific code. You may have the same User Interface action but the code needs to execute native APIs or just respond differently depending on the different business rules. Uno Platform provides easy to use pre-processor directives to make this easy to use.

When building cross-platform applications one of the most important features is platform specific features. Such as rendering particular controls on Android vs iOS vs WASM vs UWP vs etc. This gives the application developer the most control to conform to platform design best practices but work in a 100% shared code. Uno Platform has a very impressive API access for platform specific rendering, even in the XAML you can define controls that will only render on the platforms you want.

Tabbed pages is a best practice in modern application development which holds true especially for the smaller form factors such as mobile apps. Uno Platform is a UWP bridge for building cross platform apps in Windows, iOS, Android, MacOS, Web Assembly, and more. There are predefined controls built into the UWP library and WinUI that simplify this task, which enables you the developer to worry about business rules.

Uno Platform creates a WinUI bridge to build cross-platform applications for Windows, iOS, Android and Web Assembly. Each platform has a different technique for handling navigation. Using the UWP specifrication you can easily create a View Statck style of navigation that has a consistent look and feel across the different platforms.

Uno Platform is a cross-platform app development platform that uses C# and the Universal Windows Platform (UWP) to allow developers to build powerful apps for iOS, Android, Windows and the Web. In other words it is a WinUI bridge that enables developers to take their existing UWP skills to the other platforms. 

Dependency Injection is a great technique to leveraging native code in the context of your shared code. In Xamarin.Forms you typically create a custom renderer which gives you native access. If you need to run some native code from the shared context you can easily do this with the built-in Dependency Injection tooling.

The Zebra TC70x is a mobile touch computer or android device with a built-in hardware barcode scanning. This allows developers to create rich barcode scanning capable apps without using the camera. If you have ever built a barcode scanning app that uses a camera there is a lot of switching back and forth between the camera and the page. This really isn’t ideal when the app requires scanning multiple barcodes in sequence.

Debugging an Android App over wifi opens up new scenarios that you can't simulate with an emulator or connected device via USB. If you are like me and have custom hardware that requires a large charging cradle, it makes it even harder to test a device in your hand. See my blog about the Zebra TC70x which shows you the kind of device I am currently working with.