作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图理解为什么像下面这样使用 VisualGroup:
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
VisualStateManager.GoToState(MyButton, "Normal", true);
最佳答案
VisualState
s 在 VisualStateGroup 内是互斥的。您可能一次处于多个状态,只要它们在不同的组中即可。
从 MSDN 文档:
For example, the CheckBox has two VisualStateGroup objects. One contains the
states, Normal, MouseOver, Pressed, and Disabled. The other contains the states,
Checked, UnChecked, and Indeterminate. The CheckBox can be in states MouseOver
and UnChecked at the same time, but it cannot be in the MouseOver and Pressed
states at the same time.
关于xaml - 为什么要使用 VisualGroup?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17636868/
我试图理解为什么像下面这样使用 VisualGroup: 当改变视觉状态通常独立于 VisualGroup 参数完成时 例如。 VisualStateManager.Go
我正在尝试将我的 ControlTemplate 中的 VisualStateManager 用于 ToggleButton。我希望 ToggleButton 在选中时看起来是一种方式,在未选中时看起
我是一名优秀的程序员,十分优秀!