public void RemoveField(ThingViewModel thing, FieldViewModel field) { Debug.Assert(thing.Fields.Contains(field)); if (!thing.Fields.Remove(field)) { Debug.Assert(false); } if (thing.Source.Fields != null) { thing.Source.Fields.Remove(field.Source); if (thing.Source.Fields.Count == 0) { thing.Source.Fields = null; } } thing.Update(); }
private void ViewThing(ThingViewModel viewModel) { Debug.Assert(viewModel != null); this.ThingViewerControl.ViewThing(viewModel.Source.Id); this.ViewerFlyout.IsOpen = true; }
public void SetViewer(ThingViewModel thing) { this.viewerViewModel = thing; this.NotifyPropertyChanged(nameof(this.WindowTitle)); }
public WordViewModel(ThingViewModel thing, Word source) : base(source) { this.Thing = thing; }