phm*_*phm 10 crash blend visual-studio-2015 uwp
我得到以下内容:
灾难性故障(HRESULT异常:0x8000FFFF(E_UNEXPECTED))
当ListView属性在Visual State中设置为Null时.这没有任何意义,为什么VS和Blend会抱怨?
<VisualState.Setters>
<Setter Target="listView.(Selector.IsSynchronizedWithCurrentItem)" Value="{x:Null}"/>
</VisualState.Setters>
Run Code Online (Sandbox Code Playgroud)
编辑
一个类似的问题:
<VisualState.Setters>
<Setter Target="NumberButtonBox.(RelativePanel.RightOf)" Value="{x:Null}" />
<Setter Target="NumberButtonBox.(RelativePanel.Below)" Value="GridPlaceholder" />
</VisualState.Setters>
Run Code Online (Sandbox Code Playgroud)
其中NumberButtonBox定义为
<Viewbox x:Name="NumberButtonBox" RelativePanel.RightOf="GridPlaceholder" MaxWidth="250" MaxHeight="450" MinWidth="200">
Run Code Online (Sandbox Code Playgroud)
错误仅在设置器上使用值而{x:Null}不是在另一行上显示.更改Setter行的顺序无效.
是否以这种方式将属性设置为Null以清除此值的正确方法?在运行时它确实有效,只是编辑器有这个问题.
在设计时设置 null 而不崩溃的唯一替代方法是(如这个类似问题中所报告的)
例子:
<Style x:Key="MyList" TargetType="ListView">
<Setter Property="Transitions" >
<Setter.Value>
<TransitionCollection></TransitionCollection>
</Setter.Value>
</Setter>
</Style>
Run Code Online (Sandbox Code Playgroud)
代替:
Style x:Key="MyList"
TargetType="ListView">
<Setter Property="Transitions"
Value="{x:Null}"/>
</Style>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1069 次 |
| 最近记录: |