WPF - TabItem MouseOver not working as intended

后端 未结 2 652
-上瘾入骨i
-上瘾入骨i 2021-01-19 14:56

I have an issue with the IsMouveOver trigger with a TabItem Element.

When the mouse cursor is on a TabItem, its background color changes, which is what I want => It

2条回答
  •  不思量自难忘°
    2021-01-19 15:32

    It does not work because Border as container takes all events, and MouseOver is not exception. If you want to ignore MouseOver event for some part (your inner part of the item) then just put inner item on top of wider item.

    You can add Grid control beneath inner part and bind Trigger to its MouseOver event.

        
    
        
        
                
                
            
    
    
    
    
        
        
        
        
    
    
        
        
        
    
    
        
    
    
    

提交回复
热议问题