private static void ShowEmptyHost(Window host, string title, ShowWindowMode mode) { long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME); if (host is null) { host = new DxThemedWindowHost(); host.Height = Common.DEFAULT_WINDOW_HEIGHT_SMALL; host.Width = Common.DEFAULT_WINDOW_WIDTH_SMALL; host.Title = title; } if (mode == ShowWindowMode.Modal_ShowDialog) { long endTicks2 = Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); host.Title = $"{host.GetType()} loadtime: {Log.GetDuration(startTicks, endTicks2)}"; host.ShowDialog(); } else { host.Show(); } long endTicks = Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); host.Title = $"{host.GetType()} loadtime: {Log.GetDuration(startTicks, endTicks)}"; }
private void btnVNC_MVVM_VAVM1stDI_Click(object sender, RibbonControlEventArgs e) { DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_VAVMDI_Host, "MVVM ViewAViewModel First (ViewModel is passed new View) - DI Resolve", Common.DEFAULT_WINDOW_WIDTH_SMALL, Common.DEFAULT_WINDOW_HEIGHT_SMALL, ShowWindowMode.Modeless_Show, (ViewAViewModel)Common.ApplicationBootstrapper.Container.Resolve(typeof(ViewAViewModel)) ); }
private void btnExplorePivotStuff_Click(object sender, RibbonControlEventArgs e) { DxThemedWindowHost.DisplayUserControlInHost(ref vncExplorePivotStuffHost, "MVVM ViewC1 First C1 has C1() nd C1(ViewModel) constructors. No DI Registrations", Common.DEFAULT_WINDOW_WIDTH_SMALL, Common.DEFAULT_WINDOW_HEIGHT_SMALL, ShowWindowMode.Modeless_Show, (ExplorePivotStuff)Common.ApplicationBootstrapper.Container.Resolve(typeof(ExplorePivotStuff)) ); }
private void btnThemedWIndowHostModal_Click(object sender, RibbonControlEventArgs e) { long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME); DxThemedWindowHost.DisplayUserControlInHost(ref themedWindowHost, "ThemedWindowHost (Modal)", Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modal_ShowDialog); Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); }
private void btnPrismRegionTest_Click(object sender, RibbonControlEventArgs e) { long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME); DxThemedWindowHost.DisplayUserControlInHost(ref prismRegionTestHost, "Prism Region Test 2", 600, 400, ShowWindowMode.Modeless_Show, PrismRegionTest); Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); }
private void btnThemedWindowHost_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref themedWindowHostModeless, "ThemedWindowHost (Modeless)", Common.DEFAULT_WINDOW_WIDTH_SMALL, Common.DEFAULT_WINDOW_HEIGHT_SMALL, ShowWindowMode.Modeless_Show); Log.EVENT_HANDLER("Exit", Common.LOG_CATEGORY, startTicks); }
private void btnDxDockLayoutManagerControl_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref dxDockLayoutManagerControlHost, "DxDocLayoutManagerControl Test", Common.DEFAULT_WINDOW_WIDTH_LARGE, Common.DEFAULT_WINDOW_HEIGHT_LARGE, ShowWindowMode.Modeless_Show, DxDockLayoutManagerControl); Log.EVENT_HANDLER("Exit", Common.LOG_CATEGORY, startTicks); }
//public static VNC.Core.Xaml.Presentation.WindowHost editControlPointsHost = null; private void btnEditParagraph_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref editParagraphHost, "Edit Paragraph", 300, 600, ShowWindowMode.Modeless_Show, new Presentation.Views.EditParagraph(new EditParagraphViewModel())); Log.EVENT_HANDLER("Exit", Common.LOG_CATEGORY, startTicks); }
private void btnDockLayoutManagerControl_Click(object sender, RibbonControlEventArgs e) { long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME); DxThemedWindowHost.DisplayUserControlInHost(ref dxDockLayoutManagerControlHost, "DxDocLayoutManagerControl Test", Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, new DxDockLayoutManagerControl()); Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); }
private void btnEditText_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref editTextHost, "Edit Text", Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, new EditText(new EditTextViewModel())); Log.EVENT_HANDLER("Exit", Common.LOG_CATEGORY, startTicks); }
private void btnPrismRegionTest_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref prismRegionTestHost, "Prism Region Test", Common.DEFAULT_WINDOW_WIDTH_LARGE, Common.DEFAULT_WINDOW_HEIGHT_LARGE, ShowWindowMode.Modeless_Show, PrismRegionTest); Log.EVENT_HANDLER("Exit", Common.LOG_CATEGORY, startTicks); }
private void btnDuplicatePage_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref duplicatePageHost, "Duplicate Page", Common.DEFAULT_WINDOW_WIDTH_SMALL, Common.DEFAULT_WINDOW_HEIGHT_SMALL, //Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, new Presentation.Views.DuplicatePage(new DuplicatePageViewModel())); Log.EVENT_HANDLER("Exit", Common.LOG_CATEGORY, startTicks); }
private void btnLoadAZDOHost_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref azdo_Host, "wucTaskPane_TFS", 600, 900, //Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, new User_Interface.User_Controls.wucTaskPane_TFS()); Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); }
private void btnMovePages_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref movePagesHost, "Move Paqe(s)", Common.DEFAULT_WINDOW_WIDTH_SMALL, Common.DEFAULT_WINDOW_HEIGHT_SMALL, ShowWindowMode.Modeless_Show, (MovePageViewModel)Common.ApplicationBootstrapper.Container.Resolve(typeof(MovePageViewModel)) ); Log.EVENT_HANDLER("Exit", Common.LOG_CATEGORY, startTicks); }
private void btnVNC_MVVM_VM1_Modal_Click(object sender, RibbonControlEventArgs e) { long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME); DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_VM1_Modal_Host, "MVVM ViewModel First (ViewModel is passed View) Modal", 800, 600, //Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modal_ShowDialog, new CatViewModel(new Cat())); Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); }
private void btnVNC_MVVM_V1XamlVM_DI_Click(object sender, RibbonControlEventArgs e) { long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME); DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_V1XamlVM_DI_Host, "MVVM View First (CatXamlVM) using Dependency Injection", 800, 600, //Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, (CatXamlVM)Common.ApplicationBootstrapper.Container.Resolve(typeof(CatXamlVM))); Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); }
private void btnLoadActiveDirectoryHostMVVM_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref ad_HostMVVM, "Active Directory Explorer (MVVM)", 600, 900, //Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, new ActiveDirectoryExplorer.Presentation.Views.ActiveDirectoryExplorer()); Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); }
private void btnVNC_MVVM_VC2_1st_Click(object sender, RibbonControlEventArgs e) { // NOTE(crhodes) // This does wire View to ViewModel // Because we have removed the default ViewB Constructor // and Registered ViewBViewModel in SupportTools_VisioModules DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_VC2_Host, "MVVM ViewC2 First (View is passed new ViewModel) DI Resolve", Common.DEFAULT_WINDOW_WIDTH_SMALL, Common.DEFAULT_WINDOW_HEIGHT_SMALL, ShowWindowMode.Modeless_Show, (ViewC2)Common.ApplicationBootstrapper.Container.Resolve(typeof(ViewC2)) ); }
private void btnCommandCockpit_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref commandCockpitHost, "Command Cockpit (XML Commands)", Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, //(CommandCockpitViewModel)Common.ApplicationBootstrapper.Container.Resolve(typeof(CommandCockpitViewModel)) (CommandCockpit)Common.ApplicationBootstrapper.Container.Resolve(typeof(CommandCockpit)) ); Log.EVENT_HANDLER("Exit", Common.LOG_CATEGORY, startTicks); }
private void btnVNC_MVVM_VA1st_Click(object sender, RibbonControlEventArgs e) { // NOTE(crhodes) // This does not wire View to ViewModel // Because we HAVE NOT Registered ViewAViewModel in SupportTools_VisioModules // Parameterless ViewA() constructor is called. DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_VA_Host, "MVVM ViewA First - No Registrations - DI Resolve", Common.DEFAULT_WINDOW_WIDTH_SMALL, Common.DEFAULT_WINDOW_HEIGHT_SMALL, ShowWindowMode.Modeless_Show, (ViewA)Common.ApplicationBootstrapper.Container.Resolve(typeof(ViewA)) ); }
private void btnVNC_MVVM_VC1_1st_Click(object sender, RibbonControlEventArgs e) { // NOTE(crhodes) // This does wire View to ViewModel // C1 has C1() no C1(ViewModel) constructors. No DI Registrations // NB. AutoWireViewModel=false DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_VC1_Host, "MVVM ViewC1 First C1 has C1() nd C1(ViewModel) constructors. No DI Registrations", Common.DEFAULT_WINDOW_WIDTH_SMALL, Common.DEFAULT_WINDOW_HEIGHT_SMALL, ShowWindowMode.Modeless_Show, (ViewC1)Common.ApplicationBootstrapper.Container.Resolve(typeof(ViewC1)) ); }
private void btnLinqToExcel_Click (object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); DxThemedWindowHost.DisplayUserControlInHost(ref linqToExcelHost, "Linq to Excel", Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, (Presentation.Views.LinqToExcel)Common.ApplicationBootstrapper.Container.Resolve(typeof(Presentation.Views.LinqToExcel)) ); Log.EVENT_HANDLER("Exit", Common.LOG_CATEGORY, startTicks); }
private void btnVNC_MVVM_V1_DI2_Click(object sender, RibbonControlEventArgs e) { long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME); DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_V1_DI2_Host, "MVVM View First (Cat2) using Dependency Injection", 800, 600, //Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, (Cat2)Common.ApplicationBootstrapper.Container.Resolve(typeof(Cat2))); // NOTE(crhodes) // Hum. This is interesting. Have not registered Cat2 in Bootstrapper but still Resolved! Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); }
private void btnVNC_MVVM_VM1_DI_Click(object sender, RibbonControlEventArgs e) { long startTicks = Log.EVENT_HANDLER("Enter", Common.PROJECT_NAME); DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_VM1_DI_Host, "MVVM ViewModel First (CatViewModel) using Dependency Injection", 800, 600, //Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, (CatViewModel)Common.ApplicationBootstrapper.Container.Resolve(typeof(CatViewModel))); // NOTE(crhodes) // Hum. This works great but somewhat unexpectedly calls the CatViewModel(Cat view) constructor // Might be exactly what we want but how would you just call the CatViewModel() constructor? // Does it matter if we don't register the Cat View? Log.EVENT_HANDLER("Exit", Common.PROJECT_NAME, startTicks); }
private void btnVNC_MVVM_VAVM1st_Click(object sender, RibbonControlEventArgs e) { Int64 startTicks = Log.EVENT_HANDLER("Enter", Common.LOG_CATEGORY); // NOTE(crhodes) // Wire things up ourselves - ViewModel First - with a little help for DI. DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_VAVM1st_Host, "MVVM ViewAViewModel First (ViewModel is passed new ViewA) - By Hand", Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, ShowWindowMode.Modeless_Show, new ViewAViewModel( new ViewA(), (IEventAggregator)Common.ApplicationBootstrapper.Container.Resolve(typeof(EventAggregator)), (IMessageDialogService)Common.ApplicationBootstrapper.Container.Resolve(typeof(MessageDialogService)) ) ); Log.EVENT_HANDLER("Exit", Common.LOG_CATEGORY, startTicks); }
public void ShowShell() { Int64 startTicks = Log.VIEWMODEL("Enter", Common.LOG_CATEGORY); var foo = _container.Resolve <CreateWorkItemMain>(); DxThemedWindowHost.DisplayUserControlInHost(ref vncMVVM_V1_Modal_Host, "MVVM View First (View is passed ViewModel) Modal", 600, 450, //Common.DEFAULT_WINDOW_WIDTH, Common.DEFAULT_WINDOW_HEIGHT, VNC.Core.Presentation.ShowWindowMode.Modeless_Show, foo); //var shell = _container.Resolve<Shell>(); //var scopedRegion = _regionManager.CreateRegionManager(); //RegionManager.SetRegionManager(shell, scopedRegion); //scopedRegion.RequestNavigate(RegionNames.ContentRegion, uri); //shell.Show(); Log.VIEWMODEL("Exit", Common.LOG_CATEGORY, startTicks); }