WPF TreeViewItem Expanding Animation
问题 I used the code from question Wpf treeview - i want to animate the expansion of the nodes, but the animation doesn't work on the first expand, it does work for the consequent expand events. any ideas? 回答1: Change the Trigger Value to false and swap the EnterAction's storyboard to ExitAction's 回答2: Here is a solution: <Style x:Key="TreeViewItemStyle1" TargetType="{x:Type TreeViewItem}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="BorderBrush" Value="Transparent"/>