gpt4 book ai didi

crash - E_UNEXPECTED UWP 灾难性故障

转载 作者:行者123 更新时间:2023-12-03 15:22:14 28 4
gpt4 key购买 nike

我得到以下信息:

Catastrophic failure (Exception from 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">

该错误仅在使用值 {x:Null} 的 setter 上显示,不在另一条线上。更改 Setter 行的顺序无效。

以这种方式将属性设置为 Null 是清除此值的正确方法吗?在运行时它确实有效,只是编辑器对此有问题。

最佳答案

在设计时设置 null 而不会崩溃的唯一替代方法是这个(如 this similar question 中所述)

例子:

<Style x:Key="MyList" TargetType="ListView">
<Setter Property="Transitions" >
<Setter.Value>
<TransitionCollection></TransitionCollection>
</Setter.Value>
</Setter>
</Style>

代替:
Style x:Key="MyList"
TargetType="ListView">
<Setter Property="Transitions"
Value="{x:Null}"/>
</Style>

关于crash - E_UNEXPECTED UWP 灾难性故障,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34292889/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com