WPF 和 VSM - 状态列表?

发布于 2024-07-25 10:12:26 字数 173 浏览 1 评论 0原文

我在 WPF 中使用 VSM(视觉状态管理器,来自 WPF 工具包),并且尝试查找状态列表。

基本上,我知道存在某些“神奇”状态 - 例如当鼠标悬停在控件上时自动应用 MouseOver 状态,或者当...聚焦时应用 Focused 状态。

某处有这些的列表吗? 我确信有,只是我找不到。

I'm using VSM (Visual State Manager, from the WPF Toolkit) in WPF and I'm trying to find a list of States.

Basically, I understand that there are certain "magic" states - like the MouseOver state is automatically applied when the control is moused over, or the Focused state that is applied when ... focused.

Is there a list of these somewhere? I'm sure there is, I just can't find it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

初懵 2024-08-01 10:12:26

此处 是关于此的另一个资源。

Jeetu 在其中列出了每个基本控件的状态组以及每个组中的状态……。 为了方便起见,我也会在这里列出它们。

Button, GridViewColumnHeader, RepeatButton:
    CommonStates: Normal, MouseOver, Pressed, Disabled
    FocusStates: Unfocused, Focused

CheckBox, RadioButton:
    CommonStates: Normal, MouseOver, Pressed, Disabled
    CheckStates: Unchecked, Checked, Indeterminate
    FocusStates: Unfocused, Focused

ListBoxItem:
    CommonStates: Normal, MouseOver
    SelectionStates: Unselected, Selected
    FocusStates: Unfocused, Focused

ProgressBar:
    CommonStates: Determinate, Indeterminate
    FocusStates: Unfocused, Focused

TextBox, RichTextBox:
    CommonStates: Normal, MouseOver, Disabled, ReadOnly
    FocusStates: Unfocused, Focused

Here is another resource on this.

In it, Jeetu lists out the state groups and the states in each group ... for each of the basic controls. I'll list them out here too for convenience.

Button, GridViewColumnHeader, RepeatButton:
    CommonStates: Normal, MouseOver, Pressed, Disabled
    FocusStates: Unfocused, Focused

CheckBox, RadioButton:
    CommonStates: Normal, MouseOver, Pressed, Disabled
    CheckStates: Unchecked, Checked, Indeterminate
    FocusStates: Unfocused, Focused

ListBoxItem:
    CommonStates: Normal, MouseOver
    SelectionStates: Unselected, Selected
    FocusStates: Unfocused, Focused

ProgressBar:
    CommonStates: Determinate, Indeterminate
    FocusStates: Unfocused, Focused

TextBox, RichTextBox:
    CommonStates: Normal, MouseOver, Disabled, ReadOnly
    FocusStates: Unfocused, Focused
凉世弥音 2024-08-01 10:12:26

查看 Karen Corby 在 零件和零件 使用 VisualStateManager 的状态模型(参见第 4 点)。 她列出了在 Silverlight 的基本控件上实现的两个“特殊”状态组:

Silverlight CommonStates(正常、鼠标悬停、按下、禁用)和 FocusStates(未聚焦、聚焦)
(来源:scorbs.com

我相信 WPF 保留了这种组织和命名约定,以便与首先实现 VSM 的 Silverlight 兼容。

Have a look at Karen Corby's last post on Parts & States Model with VisualStateManager (see point 4). She lists two 'special' state groups that are implemented on the base controls for Silverlight:

Silverlight CommonStates (Normal, MouseOver, Pressed, Disabled) and FocusStates(Unfocused, Focused)
(source: scorbs.com)

I believe that WPF kept this organization and naming convention for compatibility with Silverlight, where VSM was first implemented.

烟沫凡尘 2024-08-01 10:12:26

对于那些在 .NET 4.0 上查看 WPF 的人,您可以在此处获取详尽的列表:

http: //msdn.microsoft.com/en-us/library/aa970773.aspx

For those looking at WPF on .NET 4.0 you can get an exhaustive list here:

http://msdn.microsoft.com/en-us/library/aa970773.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文