Silverlight灾难性故障 超级郁闷

萤火架构 2008-11-01 01:35:43
没有添加TextBox的时候是好的,加过来就异常了,编译能通过,运行就不行了

[code=XAML]
<UserControl xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" x:Class="SilverlightDemo.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="400">
<Canvas Background="Beige">
<TextBox></TextBox>
</Canvas>
</UserControl>
[/code]

配置:
Microsoft Silverlight Projects 2008 版本 9.0.30729.143
Microsoft Visual Studio 2008 专业版 - 简体中文 Service Pack 1 (KB945140)


异常信息:
灾难性故障 (异常来自 HRESULT:0x8000FFFF (E_UNEXPECTED))
在 MS.Internal.XcpImports.CheckHResult(UInt32 hr)
在 MS.Internal.XcpImports.RenderTargetBitmapRender(HostingRenderTargetBitmap bitmap, UIElement visual, Int32& dirtyX, Int32& dirtyY, Int32& dirtyWidth, Int32& dirtyHeight)
在 System.Windows.Interop.HostingRenderTargetBitmap.Render(UIElement visual)
在 MS.Internal.Silverlight.Host.RuntimeInterop.RenderElementToTargetBitmap(Int32 elementKey, Int32 targetBitmapIdentifier)
在 MS.Internal.Silverlight.Host.Interop.RenderElementToTargetBitmap(Int32 element, Int32 targetBitmapIdentifier, ISilverlightContentDownloadCallback urlcallback)
在 MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.UpdateBitmap()
在 MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.UpdateTree()
在 MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.MeasureOverride(Size constraint)
在 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
在 System.Windows.UIElement.Measure(Size availableSize)
在 MS.Internal.Silverlight.Host.CiderSilverlightImageHost.MeasureOverride(Size constraint)
在 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
在 System.Windows.UIElement.Measure(Size availableSize)
在 System.Windows.ContextLayoutManager.UpdateLayout()
在 System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
在 System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
在 System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
在 System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
在 System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

...全文
333 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
GaloreZ 2009-12-17
  • 打赏
  • 举报
回复
继续关注。。。正在郁闷中,我是手动创建的页面。楼主解决了。告诉一下,谢谢
wenjianfu871125 2008-11-06
  • 打赏
  • 举报
回复
在你的sl下添加引用System.Windows.Controls
重新编译一下
likegod 2008-11-02
  • 打赏
  • 举报
回复
给textbox加上必要的属性。
如果还是不行的话,就要考虑是环境或控件的版本冲突了。
ms44 2008-11-02
  • 打赏
  • 举报
回复
如果你用的都是标准的SL控件库。
并且版本是对的。
那么只有可能你的环境有问题,这个因素就多了。

另外你安装的时候没有出现任何错误么?
萤火架构 2008-11-01
  • 打赏
  • 举报
回复
发现有些控件没有问题 但是有些如TextBox\ComboBox就有问题

是不是我的Silverlight Tools 和Silverlight SDK不一致呢

我下的都是最新的
ms44 2008-11-01
  • 打赏
  • 举报
回复
只有这么点XAML么CODE么/
如果是那么估计你的环境有问题。
但是错误信息好像你还有其余的代码。
是不是引用了什么控件库?
萤火架构 2008-11-01
  • 打赏
  • 举报
回复
是不是Sliverlight 2仍旧不怎么成熟,找不到解决办法了
萤火架构 2008-11-01
  • 打赏
  • 举报
回复
谁给分析下问题

8,735

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧