How to open a WPF Popup when another control is clicked, using XAML markup only?

后端 未结 5 2114
梦如初夏
梦如初夏 2020-11-28 21:34

I\'ve got two controls, a TextBlock and a PopUp. When the user clicks (MouseDown) on the textblock, I want to display the popup. I would think that I could do this with an E

5条回答
  •  情深已故
    2020-11-28 22:27

    I had some issues with the MouseDown part of this, but here is some code that might get your started.

    
        
            
                
                    
                        
                        
                        
                            
                                Test Popup Content
                            
                        
                        
                        
                            
                                
                                    
                                        
                                            
                                        
                                    
                                
                            
                            
                                
                                    
                                        
                                            
                                        
                                    
                                
                            
                        
                    
                
            
        
    
    

提交回复
热议问题