O'Reilly logo

Xamarin Blueprints by Michael Williams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building the CameraPage

Now for the final page of the solution, the CameraPage introduces some new tricks to handle orientation changes with Grid positions. We will be using Converters to change rows and columns on the Grid to reposition elements when we change orientation.

We are going to start with adding some converters to the project. Let's create a new folder in the Camera project, add a new file called NotConverter.cs, and implement the following:

public class NotConverter : IValueConverter { #region Public Methods public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { var b = value as bool?; if (b != null) { return !b; } return value; } public object ConvertBack(object value, Type ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required