Reputation: 4056
I'm curious of how it would be possible to get the height of the Windows Phone application bar when in 'mini' mode. I've seen several resources on the height when the regular icon buttons are shown, but none with only the ellipses.
Upvotes: 2
Views: 2597
Reputation: 1576
In codebehind:
double appBarMiniSize = ApplicationBar.MiniSize; // 30.0
Upvotes: 3
Reputation: 12465
I'll help you solve this yourself. Create a test app and modify the mainpage to have the following xaml
<phone:PhoneApplicationPage
x:Class="WinPhone8App.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
shell:SystemTray.IsVisible="False">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<TextBlock Text="{Binding ActualHeight, ElementName=LayoutRoot}" />
</Grid>
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar Mode="Minimized">
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem Text="test" />
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>
Run the application. You'll notice the height will be displayed in the TextBlock. Take that amount and subtract it from 800 and you will have your answer.
Upvotes: 0