ContextMenu.PlacementTarget is not getting set, no idea why

前端 未结 3 2027
無奈伤痛
無奈伤痛 2020-12-10 08:20

  

        
3条回答
  •  没有蜡笔的小新
    2020-12-10 08:35

    Here is a working standalone XAML-only example based on your test case: a ContextMenu that retrieves a Command from the DataContext of its PlacementTarget using a Tag. You can reintroduce portions of your code until it stops working to try to find where the problem is:

    
        
            
                
                
            
            
                
                    
                    
                        
                            
                        
                    
                
            
        
        
            
        
    
    

提交回复
热议问题