public GRNItemModal() { InitializeComponent(); LocalizeLabel(); _vm = DataContext as GRNItemModalViewModel; _vm.ClearAndSetup.Execute(null); _vm.RequestClose += (s, e) => this.Close(); }
/// <summary> /// Provides a deterministic way to create the GRNItemModalViewModel property. /// </summary> public static void CreateGRNItemModalViewModel() { if (_grnItemModalViewModel == null) { _grnItemModalViewModel = new GRNItemModalViewModel(); } }
/// <summary> /// Provides a deterministic way to delete the GRNItemModalViewModel property. /// </summary> public static void ClearGRNItemModalViewModel() { _grnItemModalViewModel.Cleanup(); _grnItemModalViewModel = null; }