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.
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;