public SearchAssetsTransaction(AssetsTransactionViewModel assetsTransactionViewModel) { InitializeComponent(); _assetsTransactionViewModel = assetsTransactionViewModel; _viewModel = (SearchAssetsTransactionViewModel)LayoutRoot.DataContext; DataContext = _viewModel; }
public AssetsTransaction() { InitializeComponent(); ViewModel = LayoutRoot.DataContext as AssetsTransactionViewModel; DataContext = ViewModel; SwitchFormMode(FormMode.Add); ViewModel.SubmitSearchAction += ViewModel_SubmitSearchAction; }