WPF Popup hiding problem

后端 未结 6 1544
耶瑟儿~
耶瑟儿~ 2021-01-13 22:59

Suppose you have a ToggleButton for opening a Popup, same behaviour as all known elements as ComboBox etc.

... which is this c

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-13 23:34

    To prevent closing the Popup by clicking its background, insert something that will fill it.

    In this example, clicking the unfilled space will close the Popup:

                
                    
    
    

    In this example, clicking the unfilled space will NOT close the Popup:

    
             
                    
            
    
    

提交回复
热议问题