wp神级困惑,大师们进来看看啊
拿到一个别人开发的wp程序,运行起来,在这里就报错public MainPage()
{
try
{
InitializeComponent();
}
catch (Exception ex)
{
}
}
错误信息:
{System.Windows.Markup.XamlParseException: [Line: 0 Position: 0] ---> System.Windows.Markup.XamlParseException: The type 'TemplatedListBox' was not found. [Line: 446 Position: 61]
at MS.Internal.XcpImports.CreateFromXaml(UnmanagedMemoryStream stream, String sourceAssemblyName, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, String xamlResourceUriString)
at System.Windows.Controls.Control.LoadXamlResource(Assembly source, String streamName, CultureInfo cultureInfo)
--- End of inner exception stack trace ---
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at AutoWP7.MainPage.InitializeComponent()
at AutoWP7.MainPage..ctor()}
查了一下午,也没找到有人遇到同类问题
大神请注意,The type 'TemplatedListBox' was not found. [Line: 446 Position: 61] 这句话,TemplatedListBox这个东西我整个项目里也没有。Line: 446 Position: 61位置提示显然也不具有任何参考性!
坐等高手指点 Windows Phone 异常 wp8 移动开发 --------------------编程问答-------------------- 1,InitializeComponent();这句不用try...
2,你看一下你的xaml文件里搜一下有没有TemplatedListBox --------------------编程问答-------------------- 推测是你的listbox里面设置了一个template=“{staticresource TemplatedListBox}”,然后资源字典里又没有添加这个资源 --------------------编程问答--------------------
++
补充:移动开发 , Windows Phone