BindableApplicationBar and UserControls

Oct 20, 2011 at 7:50 PM

I am trying to use the BindableApplicationBar in a UserControl but I cannot make it appear.  The reason for this is that I want the contents of the control to overlay a page in a semi transparent manner so the page content can still be seen.

I have created a simple Control with nothing except a Grid containing the Application bar, the control is shown but the Application bar is not visible.  Is this by design, can a User Control not have an Application Bar?

Any help on this appreciated.  The UserControl Xaml is below:

<UserControl x:Class="Project.Views.Controls.TestControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:p7c="clr-namespace:Phone7.Fx.Controls;assembly=Phone7.Fx"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">

    <Grid x:Name="LayoutRoot" Background="Pink" Opacity="0.8" >
        <Grid.RowDefinitions>
            <RowDefinition Height="200"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <p7c:BindableApplicationBar x:Name="AppBar" Grid.Row="0" BarOpacity="0.85" IsMenuEnabled="False" Visibility="Visible" IsVisible="True" >
            <p7c:BindableApplicationBarIconButton x:Name="appBarCheck" Text="Check" IconUri="/images/dark/appbar.check.rest.png" Visibility="Visible" />
            <p7c:BindableApplicationBarIconButton x:Name="appBarCancel" Text="Cancel" IconUri="/images/dark/appbar.cancel.rest.png" Visibility="Visible" />
        </p7c:BindableApplicationBar>
    </Grid>
</UserControl>

Thanks,

Rupert