![](/img/trans.png)
[英]XAML:The attachable property VisualStateGroups was not found in type VisualStateManager
[英]Separate VisualStateManager.VisualStateGroups to a resource dictionary
有沒有辦法將VisualStateManager.VisualStateGroups
分成ResourceDictionary
?
基本上我想要的東西
<VisualStateManager.VisualStateGroups x:Name="MyVisualGroups">
<VisualStateGroup x:Name="A" />
<VisualStateGroup x:Name="B" />
<VisualStateGroup x:Name="C" />
</VisualStateManager.VisualStateGroups>
但它顯然不起作用。 有什么方法可以使它工作?
如果你將它們包裝在一個樣式對象中,你應該可以使它工作。 查看我對這個問題的答案,了解如何將VSM內容包裝到列表框中的所選狀態。
注意:我不確定這是否適用於一組通用VisualStates。 但它確實適用於整個列表框ItemContainerStyle設置。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.