Trick to see if you have a soft Steering Wheel in use

I’m sure there are some people that love the soft Steering Wheel. But sometimes, very rarely, they cause a problem when you are trying to arrange your page. One little trick you could use is to utilize the fact that the Bottom App Bar will be pushed up the screen to make room for the Steering Wheel. If we can compare the top position of the App Bar then we can assume that the Steering Wheel is in play;

GeneralTransform bottomAppBarTransform = this.TransformToVisual(this.BottomCommandBar);

Point appBarPosition = bottomAppBarTransform.TransformPoint(new Point(0, 0));

var pageHeight = this.ActualHeight;
var appbarHeight = this.BottomCommandBar.ActualHeight;

if (pageHeight - Math.Abs(appBarPosition.Y) > appbarHeight)
{
      // Hello Steering Wheel
}

Hopefully someone out there will reply with a, “no just use this simple API”. That would be nice.

One thought on “Trick to see if you have a soft Steering Wheel in use

  1. pauliom February 1, 2016 / 10:25 am

    Thanks to Pedro Lamas for this tip, you can also use the Visible Bounds property rather than rely on an App Bar;
    var bottomOfVisibleArea = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().VisibleBounds.Bottom;

    var shiftHeight = pageHeight – bottomOfVisibleArea;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s