2014-12-14 2 views
0

Windows Phone Silverlight 응용 프로그램 막대를 만들려고합니다. 이 코드를 여러 번 확인했습니다. 오류가 없습니다. 심지어 MSDN의 웹 사이트를 확인했습니다. 하지만 에뮬레이터에서이 도구를 실행하면 응용 프로그램 막대가 표시되지 않습니다.Windows Phone 용 응용 프로그램 표시 줄이 에뮬레이터에 표시되지 않습니다.

내 코드에 어떤 문제가 있습니까?

<phone:PhoneApplicationPage 
x:Class="Share_Bills.getPersonNum" 
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" 
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
FontFamily="{StaticResource PhoneFontFamilyNormal}" 
FontSize="{StaticResource PhoneFontSizeNormal}" 
Foreground="{StaticResource PhoneForegroundBrush}" 
SupportedOrientations="Portrait" Orientation="Portrait" 
mc:Ignorable="d" 
shell:SystemTray.IsVisible="True"> 

<!--LayoutRoot is the root grid where all page content is placed--> 
<Grid x:Name="LayoutRoot" Background="Transparent"> 
    <Grid.RowDefinitions> 
     <RowDefinition Height="Auto"/> 
     <RowDefinition Height="*"/> 
    </Grid.RowDefinitions> 

    <!--TitlePanel contains the name of the application and page title--> 
    <StackPanel Grid.Row="0" Margin="12,17,0,28"> 
     <TextBlock Text="SHARE BILLS" Style="{StaticResource PhoneTextNormalStyle}"/> 
     <TextBlock Text="step 1" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/> 
    </StackPanel> 

    <!--ContentPanel - place additional content here--> 
    <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> 
     <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="How many persons are you?" VerticalAlignment="Top" Margin="10,0,0,0" Height="53" Width="436"/> 
     <TextBox x:Name="personNum" HorizontalAlignment="Left" Height="72" TextWrapping="Wrap" VerticalAlignment="Top" Width="456" Margin="0,25,0,0" InputScope="Number"/> 
     <Button x:Name="btnNext1" Content="Next" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="326,97,0,0" Width="130" Click="btnNext1_Click"/> 
     <TextBlock x:Name="txtError" HorizontalAlignment="Left" Margin="10,102,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="311" Height="134"/> 
    </Grid> 

</Grid> 
<phone:PhoneApplicationPage.ApplicationBar> 
    <shell:ApplicationBar Mode="Default" Opacity="1.0" IsVisible="True" IsMenuEnabled="True"> 
     <shell:ApplicationBarIconButton IconUri="/Assets/ApplicationBar/next.png" Text="Next" Click="appBar_next"/> 
     <shell:ApplicationBar.MenuItems> 
     </shell:ApplicationBar.MenuItems> 
    </shell:ApplicationBar> 
</phone:PhoneApplicationPage.ApplicationBar></phone:PhoneApplicationPage> 
+0

프로젝트의 ApplicationBar XAML은 어디에 있습니까? –

+0

'XAML'페이지 내에 있어야합니까? 당신의 코드가 괜찮은 것 외에는. 모드를 변경하고 불투명도 속성을 제거해보십시오. – Kulasangar

+0

모드와 불투명도를 변경하려고 시도했지만 작동하지 않습니다! –

답변

1

나는 그것이 ApplicationBar와 함께 잘 작동 프로젝트를 컴파일 :

<phone:PhoneApplicationPage.ApplicationBar> 
    <shell:ApplicationBar Mode="Default" Opacity="1.0" IsVisible="True" IsMenuEnabled="True"> 
     <shell:ApplicationBarIconButton IconUri="/Assets/ApplicationBar/next.png" Text="Next" Click="appBar_next"/> 
     <shell:ApplicationBar.MenuItems> 
     </shell:ApplicationBar.MenuItems> 
    </shell:ApplicationBar> 
</phone:PhoneApplicationPage.ApplicationBar> 

다음은 전체 XAML 코드입니다. 처음에는 프로젝트 진입 점을 MainPage.xaml으로 설정했지만 코드에 getPersonNum.xaml 페이지로 문제를 언급했습니다. 나는 getPersonNum.xaml을 만났다. 이 도움이

enter image description here

희망 : 여기

내 에뮬레이터의 스크린 샷이다.

관련 문제