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 应用程序,当用户取消选中复选框时,应用程序将提示确认。如果用户选择不继续(取消)被选中,我想取消取消选中事件。换句话说,我希望复选框保持选中状态。
我怎么能在 WPF 中做到这一点?
提前致谢。
可能最干净的方法是在绑定上使用数据验证,其中您的“IsValid”功能是用户是否对提示回答“是”。
更新: 这篇文章也不错