Create a fully transparent WPF window to capture mouse events

前端 未结 6 2144
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-29 08:30

I\'m trying to trap mouse events in WPF by using a topmost, transparent non-modal window. I\'m finding that this works fine if the opacity of the window is 0.01 or greater

6条回答
  •  爱一瞬间的悲伤
    2020-12-29 09:08

    In Visual Studio 2010: Select your window in your design view.

    Set the properties of your window to:

    • AllowsTransparency : check it
    • Background : Transparent
    • WindowStyle : None

提交回复
热议问题