Dynamic ContextMenu In CodeBehind

后端 未结 3 1799
情深已故
情深已故 2021-02-13 14:28

I just want to add ContextMenu for several objects that I create dynamically, but The only way I found is to create ContextMenu in runtime like this:

ContextMen         


        
3条回答
  •  有刺的猬
    2021-02-13 14:48

    You can define your ContextMenu in resources and bind it to any control you needed. Check this out:

    
        
            
                
            
        
        
            
        
    
    

提交回复
热议问题