WPF XAML Grid Visibility Trigger

后端 未结 1 595
别那么骄傲
别那么骄傲 2021-02-14 07:32

I have a status message located on the first row of my grid and I want it to slide in and out when the visibility changes.
The first visibility trigger works great and slide

1条回答
  •  攒了一身酷
    2021-02-14 08:01

    You should remove the Visibility binding in your grid and use a DataTrigger that binds to the StatusMessageVisibility property. If you bind the grid's visibility then once it's collapsed it's collapsed and you won't be able to see the animation.

    Also, instead of having two data triggers with EnterActions, use a single data trigger that also has an ExitAction for the collapsed state:

    
        
            
        
        
    
    

    0 讨论(0)
提交回复
热议问题