Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找可以代表两种状态的 wpf“控件”。“控件”不需要接受任何用户输入,但我想在一个方向上使用 mvvm 绑定它的状态。有人可以提出一些建议吗?谢谢。
CheckBox. Bind IsChecked,为了防止用户交互,您可以禁用它。
CheckBox
IsChecked
你可以使用一个ToggleButton. 请参阅自定义 wpf 中切换按钮的切换状态以了解如何设置它的样式。
ToggleButton