private void RemoveUnchekedLayout(LayoutTreeViewModel layoutTree) { string layoutName = layoutTree.Name; var unchekedLayout = _printPackages.FirstOrDefault(x => x.PdfFileName == layoutName); if (unchekedLayout != null) { _printPackages.Remove(unchekedLayout); } }
public LayoutTreeView(List <PrintPackageModel> printPackages) { _printPackages = printPackages; foreach (var package in _printPackages) { var layout = package.Layouts; } var nodes = new LayoutTreeViewModel().CreateTree(_printPackages); InitializeComponent(); //LayoutTreeViewModel layoutTreeViewModel = this.tree.Items[0] as LayoutTreeViewModel; this.tree.ItemsSource = nodes; this.tree.Focus(); this.SizeToContent = SizeToContent.Height; //DataContext = ; }