treeview获取内部控件元素
Button btnAdd = ((tvks.HeaderTemplate as DataTemplate).LoadContent() as StackPanel).Children[2] as Button;
listbox获取子元素控件(针对数据绑定)
ListBoxItem container = lbAnm.ItemContainerGenerator.ContainerFromItem(lbAnm.Items[i]) as ListBoxItem;