public ObjectDocument(LibraryView owner, CsgGroupWrapper node) { Content = view = new ObjectView() { Node = node, Owner = owner }; BindingOperations.SetBinding(this, TitleProperty, new Binding("Name") { Source = node, Mode = BindingMode.OneWay }); if (owner != null) { owner.RegisterOpenDocument(this); } }
public PhysicsDocument(LibraryView owner, CsgGroupWrapper node) { Content = view = new PhysicsView3D() { SelectedItem = node }; BindingOperations.SetBinding(this, TitleProperty, new Binding("Name") { Source = node, Mode = BindingMode.OneWay }); if (owner != null) { owner.RegisterOpenDocument(this); } Closed += (s, e) => { view.Stop(); }; }