How do I correctly bind a Popup to a ToggleButton?

后端 未结 4 1376
猫巷女王i
猫巷女王i 2020-12-09 09:05

I am trying to do something that seems relatively simple and logic from a user interface level but I have one bug that is very annoying. I have a ToggleButton a

4条回答
  •  不知归路
    2020-12-09 09:45

    Set StaysOpen="True" for your Popup

    From MSDN:

    Gets or sets a value that indicates whether the Popup control closes when the control is no longer in focus.

    [...]

    true if the Popup control closes when IsOpen property is set to false;

    false if the Popup control closes when a mouse or keyboard event occurs outside the Popup control.

提交回复
热议问题