【问题标题】:How to resolve an entry point path error?如何解决入口点路径错误?
【发布时间】:2016-01-19 23:48:00
【问题描述】:

问题: 我已将应用程序中的视图移动到名为“视图”的新文件夹中。但在移动视图后,我注意到我收到了一个 navigation_failed 事件。

调试步骤:

为了调试它,我在事件中的异常消息上设置了一个断点。这导致我导致错误,编译器找不到移动视图的位置。

我尝试通过更新 AppManifest.xml 中的入口点和 NavigationPage 路径来解决此问题。到视图的新路径以及该路径不正确的异常点。

错误:"No XAML was found at the location '/ParkingTagPicker.Views.MainPage'."

我在清单文件中更新了这里的入口点:

EntryPoint="ParkingTagPicker.Views.MainPage"

问题:

在这种情况下,谁能建议正确的路径字符串?

我的 MainPage.xaml 位置在解决方案中如下:

<phone:PhoneApplicationPage x:Class="ParkingTagPicker.Views.MainPage"
                            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:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            Orientation="Portrait"
                            SupportedOrientations="Portrait"
                            d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
                            shell:SystemTray.IsVisible="True"
                            mc:Ignorable="d">

【问题讨论】:

    标签: xaml path windows-phone-8.1 manifest entry-point


    【解决方案1】:

    当页面位于子文件夹中时,您必须为其指定完整路径,例如“Views/MainPage.xaml”

    在应用中的页面之间导航时同样有效,例如:

      NavigationService.Navigate(new Uri("/Pages/ChartComparePage.xaml", UriKind.Relative));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-16
      • 2019-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多