public ChangeTrackingWindow() { InitializeComponent(); RadRibbonDataGroup.Visibility = Visibility.Collapsed; if (key != null) { DataContext = new ChangeTrackingViewModel(key); } }
public override void OnOpenPage(WindowOpenPageEventArg e) { if (e.CurrentObject is ChangeTrackingKey model) { DataContext = new ChangeTrackingViewModel(model); } else { DataContext = new ChangeTrackingViewModel(new ChangeTracking()); } base.OnOpenPage(e); }
public void SetKey(ChangeTrackingKey key) { this.key = key; DataContext = new ChangeTrackingViewModel(key); }