public DialogServiceControl() { InitializeComponent(); var vm = ViewUtilities.SetDataContext <DialogServiceViewModel>(this); if (vm != null) { vm.ShowDialogRequested += Vm_ShowDialogRequested; vm.ShowProgressDialogRequested += Vm_ShowProgressDialogRequested; vm.ShowFileDialogRequested += Vm_ShowFileDialogRequested; vm.ShowMessageDialogRequested += Vm_ShowMessageDialogRequested; vm.DispatchToUIThreadRequested += Vm_DispatchToUIThreadRequested; } if (!DesignerProperties.GetIsInDesignMode(this)) { if (DependencyContainer.IsTypeRegistered <IDialogCreator>()) { this.dialogCreator = DependencyContainer.Get <IDialogCreator>(); } } }
public TesMenuControl() { InitializeComponent(); ViewUtilities.SetDataContext <TestMenuControlViewModel>(this); }
public DataGridTestControl() { InitializeComponent(); ViewUtilities.SetDataContext <DataGridTestControlViewModel>(this); }