1. [WPF] 代码构建 ItemsPanel
var itemsPanelTemplate = new ItemsPanelTemplate();
var factory = new FrameworkElementFactory(typeof(AnimatingStackPanel));
factory.SetValue(StackPanel.OrientationProperty, Orientation.Vertical);
itemsPanelTemplate.VisualTree = factory;