Silverlight 4:转换时 ExtendedVisualStateManager 错误
所以我有一个具有 3 个状态的控件,每个状态都会切换控件的可见性,并且使用 FluidLayout 进行动画处理。预览过渡时,这在混合中有效,但是当我在浏览器中从第一个状态转到第二个状态时,出现以下错误。
网页错误详细信息
用户代理:Mozilla/4.0(兼容; 微星8.0; Windows NT 6.1;哇64; 三叉戟/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729;媒体中心电脑6.0; .NET4.0C; .NET4.0E;信息路径.3) 时间戳:2010 年 12 月 17 日星期五 15:40:32 世界标准时间
消息:未处理的错误 Silverlight 应用程序代码:4004
类别:托管运行时错误
消息:System.ArgumentException: 值不属于 预期范围。在 MS.Internal.XcpImports.CheckHResult(UInt32 小时)在 MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection1 集合,CValue 值)位于 MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection
1 集合,DependencyObject 值)
在 System.Windows.PresentationFrameworkCollection1.AddDependencyObject(DependencyObject 值)位于 System.Windows.Controls.UIElementCollection.AddInternal(UIElement 值)在 System.Windows.PresentationFrameworkCollection
1.Add(T 值)在 Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.WrapMovingElementsInCanvases(List1 movingElements,字典
2 oldRects, 字典`2 newRects) 位于 Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.GoToStateCore(控制 控件、框架元素 stateGroupsRoot,字符串状态名称, VisualStateGroup 组、VisualState 状态,布尔值 useTransitions) at System.Windows.VisualStateManager.GoToState(控制 控制,字符串状态名称,布尔值 使用转换)在 Microsoft.Expression.Interactivity.VisualStateUtilities.GoToState(FrameworkElement 元素、字符串状态名称、布尔值 使用转换)在 Microsoft.Expression.Interactivity.Core.GoToStateAction.InvokeImpl(FrameworkElement 状态目标)在 Microsoft.Expression.Interactivity.Core.GoToStateAction.Invoke(对象 参数)在 System.Windows.Interactivity.TriggerAction.CallInvoke(对象 参数)在 System.Windows.Interactivity.TriggerBase.InvokeActions(对象 参数)在 System.Windows.Interactivity.EventTriggerBase.OnEvent(EventArgs 事件参数)在 System.Windows.Interactivity.EventTriggerBase.OnEventImpl(对象 发送者,EventArgs eventArgs) at I2.Web.Reports.Models.MainModel.Service_GetUserCompleted(对象 发送者,GetUserCompletedEventArgs e)
在 I2.Web.Reports.Services.ReportServiceClient.OnGetUserCompleted(对象 状态)
还有其他人有类似的问题吗?
So I have a control with 3 states each state toggles control visibility, and this is animated using FluidLayout. This works in blend when previewing the transitions, but when I go from the first state to the second state in browser, I get the following error.
Webpage error details
User Agent: Mozilla/4.0 (compatible;
MSIE 8.0; Windows NT 6.1; WOW64;
Trident/4.0; SLCC2; .NET CLR
2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0;
.NET4.0C; .NET4.0E; InfoPath.3)
Timestamp: Fri, 17 Dec 2010 15:40:32
UTCMessage: Unhandled Error in
Silverlight Application Code: 4004
Category: ManagedRuntimeError
Message: System.ArgumentException:
Value does not fall within the
expected range. at
MS.Internal.XcpImports.CheckHResult(UInt32
hr) at
MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection1
1
collection, CValue value) at
MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection
collection, DependencyObject value)
at
System.Windows.PresentationFrameworkCollection1.AddDependencyObject(DependencyObject value) at
1.Add(T
System.Windows.Controls.UIElementCollection.AddInternal(UIElement
value) at
System.Windows.PresentationFrameworkCollection
value) at
Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.WrapMovingElementsInCanvases(List1
2 oldRects,
movingElements, Dictionary
Dictionary`2 newRects) at
Microsoft.Expression.Interactivity.Core.ExtendedVisualStateManager.GoToStateCore(Control
control, FrameworkElement
stateGroupsRoot, String stateName,
VisualStateGroup group, VisualState
state, Boolean useTransitions) at
System.Windows.VisualStateManager.GoToState(Control
control, String stateName, Boolean
useTransitions) at
Microsoft.Expression.Interactivity.VisualStateUtilities.GoToState(FrameworkElement
element, String stateName, Boolean
useTransitions) at
Microsoft.Expression.Interactivity.Core.GoToStateAction.InvokeImpl(FrameworkElement
stateTarget) at
Microsoft.Expression.Interactivity.Core.GoToStateAction.Invoke(Object
parameter) at
System.Windows.Interactivity.TriggerAction.CallInvoke(Object
parameter) at
System.Windows.Interactivity.TriggerBase.InvokeActions(Object
parameter) at
System.Windows.Interactivity.EventTriggerBase.OnEvent(EventArgs
eventArgs) at
System.Windows.Interactivity.EventTriggerBase.OnEventImpl(Object
sender, EventArgs eventArgs) at
I2.Web.Reports.Models.MainModel.Service_GetUserCompleted(Object
sender, GetUserCompletedEventArgs e)
at
I2.Web.Reports.Services.ReportServiceClient.OnGetUserCompleted(Object
state)
Anyone else had similar issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了答案,它是一个独特的名称,我注意到我没有命名正在动画化的实例。这似乎与此
Bing 地图 silverlight 控件自定义图钉< /a>
新规则:为 Silverlight 中的所有内容命名。
需要注意的是,在我的应用中切换
Visibility
的元素实际上是一个命名的Border 但是它的子
UIElement
也必须被命名,我不确定这到底有多深......I found the answer, its a unique name thing, I had noticed that I hadn't named the instances that are getting animated. It seems to be a similar issue to this
Bing maps silverlight control custom pushpin
New rule: Name everything in Silverlight.
It is important to note that the element who's
Visibility
is toggled in my app was actually a namedBorder
however it's childUIElement
must also be named, I'm not sure how far down the rabbit hole this goes...