I have a databound treeview that i want to animate when the nodes are expanded. The animation should work vertically. Any ideas on how I could do that?
相关问题
- VNC control for WPF application
- WPF Binding from System.Windows.SystemParameters.P
- XAML: Applying styles to nested controls
- How can I add a horizontal line (“goal line”) for
- How to properly change a resource dictionary
@user275587's post, it needs to modify the original TreeViewItem style. After google, I found some styles at MSDN.
Update:
The custom TreeViewItem style with animation effection in
ResourceDictionary
file. It is modified by the TreeViewItem style in MSDN, and the posts of @user275587 and @icube.And I decorate my treeViewItem it by inherit the
customTreeViewItem
style. The following is sample code.Download default style for treeview and apply it to your treeview control, then change/add this xaml code to the treeview style:
Get the original template of TreeViewItem and modify it to have the animation. Then install it thanks to the ItemContainerStyle of TreeView.
I think this is'n a solution because you need the tirgger
else you get a tree with open all branch and the animation doesn't work correctly.