1

所以我有一个具有 3 个状态的控件,每个状态切换控件的可见性,并且使用 FluidLayout 进行动画处理。这在预览过渡时混合使用,但是当我在浏览器中从第一个状态转到第二个状态时,出现以下错误。

网页错误详情

用户代理:Mozilla/4.0(兼容;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) 时间戳:2010 年 12 月 17 日星期五 15:40:32 UTC

消息:Silverlight 应用程序代码中未处理的错误:4004
类别:ManagedRuntimeError
消息:System.ArgumentException:值不在预期范围内。在 MS.Internal.XcpImports.CheckHResult(UInt32 hr) 在 MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection 1 collection, CValue value) at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection1 集合,DependencyObject 值)
在 System.Windows.PresentationFrameworkCollection 1.AddDependencyObject(DependencyObject value) at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value) at System.Windows.PresentationFrameworkCollection1.Add(T 值) 在 Microsoft.Expression.Interactivity .Core.ExtendedVisualStateManager.WrapMovingElementsInCanvases(列表1 movingElements, Dictionary2 oldRects, 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) 在 Microsoft.Expression.Interactivity.VisualStateUtilities.GoToState(FrameworkElement element, String stateName, Boolean useTransitions) 在 Microsoft.Expression.Interactivity.Core.GoToStateAction.InvokeImpl(FrameworkElement stateTarget) 在 Microsoft.Expression.Interactivity。 System.Windows.Interactivity.TriggerAction.CallInvoke(对象参数)在 System.Windows.Interactivity.TriggerBase 的 Core.GoToStateAction.Invoke(对象参数)。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发件人,GetUserCompletedEventArgs e)
在 I2.Web.Reports.Services.ReportServiceClient.OnGetUserCompleted(对象状态)

其他人有类似的问题吗?

4

1 回答 1

1

我找到了答案,它是一个独特的名称,我注意到我没有命名正在动画的实例。这似乎是一个类似的问题

必应地图 Silverlight 控制自定义图钉

新规则:在 Silverlight 中命名所有内容。

重要的是要注意,Visibility在我的应用程序中切换的元素实际上是一个命名Border的,但是它的子元素UIElement也必须命名,我不确定这个兔子洞有多远......

于 2010-12-17T15:51:17.707 回答