【问题标题】:Need Infragistics three state XamCheckEditor to cycle null->*true*->false instead of null->*false*->true需要 Infragistics 三态 XamCheckEditor 循环 null->*true*->false 而不是 null->*false*->true
【发布时间】:2012-02-13 15:19:17
【问题描述】:

我有一个处于三态模式的XamCheckEditor (IsThreeState == true)。

默认值为null,显示不确定的灰色框(这很好)。但是,当用户单击复选框时,分配的值未选中(清除)。用户必须单击两次才能勾选(选中)。而是希望第一次单击将值更改为勾选(选中)。如何实现?

非常感谢!

【问题讨论】:

    标签: wpf user-controls wpf-controls infragistics


    【解决方案1】:

    这应作为功能请求提交给 Infragistics。您可以通过在论坛上发帖或提交支持案例来做到这一点。 get help page 提供了两者的链接。

    【讨论】:

      【解决方案2】:

      我对 Infragistics 控件并不特别熟悉,但假设它们像大多数其他 WPF 控件一样运行,您应该能够覆盖 Click() 事件并在其中根据控件的值/状态精确地管理控件状态点击时间。

      类似于(伪代码):

      private void checkBox1_Click(object sender, RoutedEventArgs e) {
          if (checkBox1.InfragisticsValue == null)
              checkBox1.InfragisticsValue == true;
          else if (checkBox1.InfragisticsValue == true)
              checkBox1.InfragisticsValue == false;
          else if (checkBox1.InfragisticsValue == false)
              checkBox1.InfragisticsValue == true;
      }
      

      希望对你有所帮助^^。

      评论后编辑

      在您发表评论后,我做了一些寻找有希望的指导。如果您正在使用“按需加载”复选框控件(具有多种状态),请尝试访问this link;我怀疑它可能有用。

      【讨论】:

      • 嗯,在像这样的 Infragistics 中没有什么明显的。有诸如 PropertyChangedEvents 和 AutomationPeers 之类的东西。跟踪调试器并没有像简单的点击处理程序那样显示任何东西。还在挖。非常感谢您的回复。
      猜你喜欢
      • 1970-01-01
      • 2016-03-27
      • 2015-02-22
      • 2020-12-05
      • 2016-11-06
      • 2022-12-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多