【问题标题】:Exception occur on executing phone:PhoneApplicationPage.ApplicationBar执行电话时发生异常:PhoneApplicationPage.ApplicationBar
【发布时间】:2014-01-21 15:42:40
【问题描述】:

我所有的 xaml 页面都可以正常工作,但是当我把它放在下面的代码中时,它给出了一个错误

<phone:PhoneApplicationPage.ApplicationBar>
    <shell:ApplicationBar IsVisible="True">
        <shell:ApplicationBarIconButton 
            IconUri="/Assets/AppBar/back.png" Text="Previous Point"
               Click="prevPointButton_Click"      />
        <shell:ApplicationBarIconButton 
            IconUri="/Assets/AppBar/minus.png" Text="Zoom In"
                Click="mapZoomMinus"      />
        <shell:ApplicationBarIconButton 
            IconUri="/Toolkit.Content/ApplicationBar.Add.png" Text="Zoom Out"
                 Click="mapZoomPlus"     />
        <shell:ApplicationBarIconButton 
            IconUri="/Assets/AppBar/next.png" Text="Next Point" Click="nextPointButton_Click"
                     />

    </shell:ApplicationBar>

</phone:PhoneApplicationPage.ApplicationBar>-->

它没有给出异常细节,但仅此

System.Windows.ni.dll 中发生了“System.Windows.Markup.XamlParseException”类型的第一次机会异常

如果有这个异常的处理程序,程序可以安全地继续。

【问题讨论】:

  • @Rehan 您是否在 Click="mapZoomPlus" 等代码中定义了所有事件处理程序???
  • 我尝试在我的解决方案中添加你的按钮,没有这样的例外
  • 删除最后的-->

标签: c# xaml windows-phone-8


【解决方案1】:

我认为您忘记在最后删除 -->

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-12-05
    • 1970-01-01
    • 2022-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多