【发布时间】:2016-03-21 11:02:22
【问题描述】:
我得到以下信息:
灾难性故障(HRESULT 异常:0x8000FFFF (E_UNEXPECTED))
当 ListView 属性在 Visual State 中设置为 Null 时。没道理,为什么VS和Blend会抱怨?
<VisualState.Setters>
<Setter Target="listView.(Selector.IsSynchronizedWithCurrentItem)" Value="{x:Null}"/>
</VisualState.Setters>
编辑
类似的问题:
<VisualState.Setters>
<Setter Target="NumberButtonBox.(RelativePanel.RightOf)" Value="{x:Null}" />
<Setter Target="NumberButtonBox.(RelativePanel.Below)" Value="GridPlaceholder" />
</VisualState.Setters>
其中 NumberButtonBox 被定义为
<Viewbox x:Name="NumberButtonBox" RelativePanel.RightOf="GridPlaceholder" MaxWidth="250" MaxHeight="450" MinWidth="200">
错误显示 仅 在 setter 上使用 {x:Null} 的值,而不是在另一行。更改 Setter 行的顺序没有效果。
以这种方式将属性设置为 Null 是否是清除该值的正确方法?在运行时它确实有效,只是编辑器对此有问题。
【问题讨论】:
-
“灾难性故障”只是对 UWP 中错误报告质量的描述,它对诊断任何事情都毫无用处。 stackoverflow.com/help/mcve
-
但至少它发生在特定情况下:
<Setter>的值为{x:Null} -
代码中的列表视图是什么?请发布更多代码..
标签: crash visual-studio-2015 uwp blend