void initData() { for (ulong i = 0; i < 10; i++) { TimelineTreeItemModel model = new TimelineTreeItemModel(new RectActor(i)); ModelsHolder.timelineTreeModelList.Add(model); } }
private void Button_Click(object sender, RoutedEventArgs e) { Button btn = sender as Button; ContentPresenter cp = btn.TemplatedParent as ContentPresenter; TimelineTreeItemModel model = cp.Content as TimelineTreeItemModel; //TreeViewItem item = treeView.ItemContainerGenerator.ContainerFromItem(model) as TreeViewItem; //if (item != null) //{ // if (item.ItemsSource == null) // { // item.ItemsSource = model.AnimationList; // } // Window animWind = new BadMovieMaker.View.Windows.AnimationSelectWindow(); // animWind.Owner = Application.Current.MainWindow; // animWind.Tag = item; // animWind.ShowDialog(); // } }