2014-05-20 3 views
0

AppBarUtils, Eariler에 문제가 있습니다. 내 appBar에 명령이 있고 실행 중입니다. 그러나 무언가가 망가졌습니다. 내 Main.xamlWindows Phone의 AppBarUtils 버그

<phone:PhoneApplicationPage 
    x:Class="OsiągnijCelPhoneApp.Views.Main" 
    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" 

     xmlns:appBarUtils="clr-namespace:AppBarUtils;assembly=AppBarUtils" 
     xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
     DataContext="{Binding Source={StaticResource Locator}, Path=Main}" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}" 
    FontSize="{StaticResource PhoneFontSizeNormal}" 
    Foreground="{StaticResource PhoneForegroundBrush}" 
    SupportedOrientations="Portrait" Orientation="Portrait" 
    mc:Ignorable="d" 
    shell:SystemTray.IsVisible="True"> 
    <phone:PhoneApplicationPage.ApplicationBar> 
     <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True"> 
      <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="login"/> 
     </shell:ApplicationBar> 
    </phone:PhoneApplicationPage.ApplicationBar> 

    <!--<i:Interaction.Behaviors> 
     <appBarUtils:AppBarItemCommand Id="login" Command="{Binding LoginIn,Mode=TwoWay}"/> 
    </i:Interaction.Behaviors>--> 

    <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="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/> 
      <TextBlock Text="page name" 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"> 
      <Button Margin="25,0,0,355" Content="Zaloguj" Command="{Binding LoginIn,Mode=TwoWay}" /> 
     </Grid> 
    </Grid> 
</phone:PhoneApplicationPage> 

내가 Telerik, MVVM 빛, 및 AppBarUtils를 사용합니다. AppBarUtils가 사전 설치되었습니다. 내가

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.ni.dll Additional information: Unknown parser error: Scanner 2148474880. [Line: 25 Position: 29] 

나는 그것을 언급하는 경우, 팔에 결정할 권한이없는 것으로 아는 데요 디버그 휴식 있기 때문에, System.Windows.Interactive에 문제가 있다고 생각

을 가지고 있다는 전화에 내를 배포 할 때.

답변

0

상호 작용 트리거를 설정하지 마십시오. 이 예제를 참조하십시오. http://allenlooplee.wordpress.com/2011/08/26/how-to-do-command-binding-for-application-bar-with-appbarutils-in-xaml/

+0

그래도 문제가 있습니다. 컴파일러 메시지는 첫 번째 게시물과 동일합니다. – user3608529

+0

죄송합니다.이 항목은 '트리거'와 아무 관련이 없습니다. 25 행은'Interactions.Behaviors' 자식 요소입니다. 그렇지 않니? TwoWay 바인딩 속성을 삭제하면 어떻게됩니까? – Pantelis

+0

불행히도 그것은 나를 도와주지 않습니다. 내가 응용 프로그램을 디버깅 할 때 VS Show me MessageBox "path my solution/Main.g.cs이 파일은 소스 제어 외부에서 수정되었습니다. 다시로드 하시겠습니까? 예, 모두 예, 아니요, 모두에게", 어쩌면 솔루션에서 obj 및 bin 폴더를 제거합니까? – user3608529