VasileF
VasileF

Reputation: 2916

Overlay the whole AppBar on the page content in windows phone 8.1

When app bar is present, the height of the app bar affects the content on the rest of the page. For example, if the app bar has a Height of about 25px when ClosedDisplayMode="Minimal", the rest of the content on the page (rootGrid) would have its actual height of Screen Height - 25px. So the app bar is not overlay on page content.

This is visible especially when the content is VerticalAlignment="Center" or Bottom.

Is there any way to avoid this? Something like a ZIndex on the AppBar so that it is displayed over the page content and not trimming it on the bottom side of the screen.

Upvotes: 2

Views: 638

Answers (1)

Jon G Stødle
Jon G Stødle

Reputation: 3904

It is possible to tell the renderer that the whole "window" should be used when rendering and not just the visible part. By calling Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow) the renderer will include the areas beneath the chrome of the window (ie the system tray on top of the screen and the app bar at the bottom). The chrome will always be on top of whatever is rendered from xaml.

ApplicationView is documented here.

If you don't want the system tray on the top of the screen to overlap the content, you'll have to compensate with a margin on the root container of your visible xaml.

Upvotes: 4

Related Questions