zoukankan      html  css  js  c++  java
  • WP8异常错误:Error HRESULT E_FAIL has been returned from a call to a COM component.

    在做WP8开发的过程中,使用到了longlistselector这个控件,本来使用没有问题。

    但是突然出现了一个闪退的错误,错误信息如下:

    {MS.Internal.WrappedException: Error HRESULT E_FAIL has been returned from a call to a COM component. ---> System.Exception: Error HRESULT E_FAIL has been returned from a call to a COM component.
    at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
    at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize)
    at System.Windows.UIElement.Measure(Size availableSize)
    at Microsoft.Phone.Controls.LongListSelector.RealizeDisplayItem(Iterator`1 iterator, RealizeOptions options)
    at Microsoft.Phone.Controls.LongListSelector.RealizedRange.Append(RealizedRange nextRange, Double bottom)
    at Microsoft.Phone.Controls.LongListSelector.AppendElement(RealizedRange range, RealizedRange nextRange, Double bottom)
    at Microsoft.Phone.Controls.LongListSelector.HealElements(Rect requireRect, Rect allowRect, Boolean& areBoundsUpdated)
    at Microsoft.Phone.Controls.LongListSelector.Balance()
    at Microsoft.Phone.Controls.LongListSelector.MeasureOverride(Size availableSize)
    at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight)
    --- End of inner exception stack trace ---}

    看似很复杂,搞得我也不知道从何下手。

    回想整个开发过程,之前使用正常,后面闪退,期间做了全局资源命名的调整,但是vs没有给出错误提示,本以为替换完毕(其实应该全局查找替换的)。

    但遗漏了一个地方,longlistselector中的HeaderDataTemplate中的一个资源使用的地方。

    在做了更改后,使用又恢复正常了。

  • 相关阅读:
    Python3.8 爬取豆瓣电影TOP250 练手爬虫
    作为一名phper,php的运行模式,你真的了解吗??
    前端自动生成条码码插件JsBarcode.all.min.js
    js判断是否在微信内打开页面
    学习Swoole之如何避免成为被坑哭的程序员
    上下界网络流
    网络流建模经验
    HttpClient和Gson跨域访问
    CentOS7+mysql5.6配置主从
    Atlas安装配置
  • 原文地址:https://www.cnblogs.com/wangzhiyu811/p/3601829.html
Copyright © 2011-2022 走看看