zoukankan      html  css  js  c++  java
  • WPF: Get application mouse events without capture?

    I want to make a user control like this:

    If the TextBox gets focus, a PopUp is shown; if the TextBox loses focus, the PopUp is hided. That's not difficult. However, here is another requirement:

    If the user click (mouse down) on the other areas/elements(Neither on the TextBox nor the PopUp) of this window, the PopUp is supposed to hide. (Notice: the focus is still on the TextBox)


    And there are many reasons not to capture the mouse for the TextBox, the most important one is the TextBox has its own mechanism to handle the mouse event. Capturing the mouse may make the TextBox behaviours odd.

    I am wondering if there is a method to get the application mouse events without capture the mouse?

    I think there must be, think about the ComboBox, you know what I mean.

  • 相关阅读:
    Docker底层技术了解(3)
    Docker整体结构了解(2)
    Docker简介(1)
    linux常用命令
    python反射
    flask线程隔离技术
    flask核心机制
    并发编程
    socket通信
    网络编程
  • 原文地址:https://www.cnblogs.com/guogangj/p/2852500.html
Copyright © 2011-2022 走看看