当前位置: 首页>>代码示例>>C#>>正文


C# IRegionManager.RegisterViewWithRegion方法代码示例

本文整理汇总了C#中IRegionManager.RegisterViewWithRegion方法的典型用法代码示例。如果您正苦于以下问题:C# IRegionManager.RegisterViewWithRegion方法的具体用法?C# IRegionManager.RegisterViewWithRegion怎么用?C# IRegionManager.RegisterViewWithRegion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IRegionManager的用法示例。


在下文中一共展示了IRegionManager.RegisterViewWithRegion方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FillRegions

 private void FillRegions()
 {
     _regionManager = Container.Resolve<IRegionManager>();
     _regionManager.RegisterViewWithRegion(MainRegion, typeof(ConfigView));
     _regionManager.RegisterViewWithRegion(MainRegion, typeof(DojoView));
     _regionManager.RegisterViewWithRegion(MainRegion, typeof(DigestView));
     _regionManager.RegisterViewWithRegion(MainRegion, typeof(AdvancedConfigView));
 }
开发者ID:PapaMufflon,项目名称:CodingDojoHelper,代码行数:8,代码来源:Bootstrapper.cs

示例2: ModuleB

        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="unityContainer">The Unity container.</param>
        /// <param name="regionManager">The region manager.</param>
        public ModuleB(IUnityContainer unityContainer, IRegionManager regionManager)
            : base(unityContainer, regionManager)
        {
            // Titlebar
            regionManager.RegisterViewWithRegion(RegionNames.LeftWindowCommandsRegions, typeof(LeftTitlebarCommands));

            // Flyouts
            regionManager.RegisterViewWithRegion(RegionNames.FlyoutRegion, typeof(C1Flyout));

            // Tiles
            regionManager.RegisterViewWithRegion(RegionNames.MainRegion, typeof(HomeTiles));
        }
开发者ID:brianlagunas,项目名称:PrismMahAppsSample,代码行数:17,代码来源:ModuleB.cs

示例3: ConnectionManagementModule

        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="unityContainer">The Unity container.</param>
        /// <param name="regionManager">The region manager.</param>
        /// <param name="regionViewRegistry">The region view registry.</param>
        public ConnectionManagementModule(IUnityContainer unityContainer, IRegionManager regionManager)
            : base(unityContainer, regionManager)
        {
            unityContainer.RegisterType<IConnectionFactory, ConnectionFactory>(new ContainerControlledLifetimeManager());
            unityContainer.RegisterType<IConnectionManager, ConnectionManager>(GlobalConstants.ConnectionManager, new ContainerControlledLifetimeManager());

            regionManager.RegisterViewWithRegion(RegionNames.RightWindowCommandsRegion, typeof(Views.ConnectionManagementTitlebarRightWindowCommands));
            regionManager.RegisterViewWithRegion(RegionNames.FlyoutRegion, typeof(Views.ConnectionsFlyout));

            // Register views for navigation
            Prism.Unity.UnityExtensions.RegisterTypeForNavigation<Views.AddConnection>(this.UnityContainer, ViewNames.AddConnectionView);
        }
开发者ID:steve600,项目名称:VersatileMediaManager,代码行数:18,代码来源:ConnectionManagementModule.cs

示例4: KodiManagementModule

        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="unityContainer">The Unity container.</param>
        /// <param name="regionManager">The region manager.</param>
        public KodiManagementModule(IUnityContainer unityContainer, IRegionManager regionManager)
            : base(unityContainer, regionManager)
        {
            // Register services
            UnityContainer.RegisterInstance<IKodiMovieLibraryManagementService>(ServiceNames.KodiMovieLibraryManagementJsonService, new KodiMovieLibraryManagementJsonService(), new ContainerControlledLifetimeManager());

            // Home-View
            regionManager.RegisterViewWithRegion(RegionNames.MainRegion, typeof(Views.KodiManagementHome));

            // Flyouts
            regionManager.RegisterViewWithRegion(RegionNames.FlyoutRegion, typeof(Views.MovieLibraryManagementFlyout));
            regionManager.RegisterViewWithRegion(RegionNames.FlyoutRegion, typeof(Views.LibraryManagementTilesFyout));
        }
开发者ID:steve600,项目名称:VersatileMediaManager,代码行数:18,代码来源:KodiManagementModule.cs

示例5: ShellWindow

        public ShellWindow(IRegionManager regionManager, IUnityContainer container)
        {
            InitializeComponent();
            Show();

            container.RegisterType<SettingsView>(new ContainerControlledLifetimeManager());
            container.RegisterType<ReportView>(new ContainerControlledLifetimeManager());
            container.RegisterType<OperationsView>(new ContainerControlledLifetimeManager());

            regionManager.RegisterViewWithRegion(RegionsNames.MenuRegionName, () => container.Resolve<MenuView>());

            regionManager.RegisterViewWithRegion(RegionsNames.MainRegionName, () => container.Resolve<SettingsView>());
            regionManager.RegisterViewWithRegion(RegionsNames.MainRegionName, () => container.Resolve<ReportView>());
            regionManager.RegisterViewWithRegion(RegionsNames.MainRegionName, () => container.Resolve<OperationsView>());
        }
开发者ID:Tranzystor,项目名称:GusDownloader,代码行数:15,代码来源:ShellWindow.xaml.cs

示例6: ModuleA

        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="unityContainer">The Unity container.</param>
        /// <param name="regionManager">The region manager.</param>
        public ModuleA(IUnityContainer unityContainer, IRegionManager regionManager)
            : base(unityContainer, regionManager)
        {
            // Titlebar
            regionManager.RegisterViewWithRegion(RegionNames.RightWindowCommandsRegion, typeof(RightTitlebarCommands));

            // Flyouts
            regionManager.RegisterViewWithRegion(RegionNames.FlyoutRegion, typeof(C1Flyout));
            regionManager.RegisterViewWithRegion(RegionNames.FlyoutRegion, typeof(C2Flyout));

            // Tiles
            regionManager.RegisterViewWithRegion(RegionNames.MainRegion, typeof(HomeTiles));

            // Register Views
            Prism.Unity.UnityExtensions.RegisterTypeForNavigation<Views.ModuleAPopup>(unityContainer, PopupNames.ModuleAPopup);
        }
开发者ID:punker76,项目名称:PrismMahAppsSample,代码行数:21,代码来源:ModuleA.cs

示例7: Shell

        public Shell(IRegionManager RegionManager)
        {
            InitializeComponent();
            _regionManager = RegionManager;
            //textbx.GotKeyboardFocus += Textbx_GotKeyboardFocus;
            //textbx.LostKeyboardFocus += Textbx_LostKeyboardFocus;

            RegionManager.RegisterViewWithRegion("MainRegion",typeof(Tecmosa.Pages.MainScreen));

            KeyPressCommand = new DelegateCommand<KeyEventArgs>(OnKeyPressed);
            AddHandler(Keyboard.KeyDownEvent, (KeyEventHandler)KeyPressed);

            //transform.ScaleX = 1;
            //transform.ScaleY = 1;

            //_mainScreenWidth = winFormsHost.Width = mainScreen.Width;
            //_mainScreenHeight = winFormsHost.Height = mainScreen.Height;

            MemoryStream ms = new MemoryStream();
            new MainScreen().BackgroundImage.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
            ms.Position = 0;
            BitmapImage bi = new BitmapImage();
            bi.BeginInit();
            bi.StreamSource = ms;
            bi.EndInit();

            mainGrid.Background = new ImageBrush(bi);
            this.Focus();
        }
开发者ID:drusteeby,项目名称:15106WPF,代码行数:29,代码来源:Shell.xaml.cs

示例8: ResourceUseCase

        public ResourceUseCase(
            // Get the ViewToRegionBinder that the baseclass needs
            IViewToRegionBinder viewtoToRegionBinder
            , IRegionManager regionManager
            , IUnityContainer container
            , IEventAggregator eventAggregator
            // Get the factories that can create the viewmodels
            , ObjectFactory<ResourceListViewModel> resourceViewModel
            , ObjectFactory<ResourceToolbarViewModel> resourceToolbarViewModel
            , IApplicationModel applicationModel
            , IModelVisualizationRegistry modelVisualizationRegistry)
           : base(viewtoToRegionBinder)
        {
            this.ApplicationModel = applicationModel;
            this.Container = container;
            // Just before the view is initialized for the first time
            this.AddInitializationMethods(
                // Create the emailViewModel and assign it to this variable
               () => this._resourceListViewModel = resourceViewModel.CreateInstance()
               , () => this._resourceToolbarViewModel = resourceToolbarViewModel.CreateInstance());

            // Register visualizations for these view models. This means: whenever a viewmodel is displayed, 
            // use this type of view to visualize it. 
            modelVisualizationRegistry.Register<ResourceListViewModel, ResourceListView>();
            modelVisualizationRegistry.Register<ResourceToolbarViewModel, ResourceToolbarView>();
            modelVisualizationRegistry.Register<ResourceEditViewModel, ResourceEditView>();

            container.RegisterType<IResourceAssignService, ResourceAssignmentService>(new ContainerControlledLifetimeManager());
            container.RegisterInstance(container.Resolve<IResourceAssignService>());

            regionManager.RegisterViewWithRegion("ResourceEditRegion", typeof(ResourceEditViewModel));
            // watch for OpenResourceEvents fired by (Link)Button command in ProjectEditViewModel...
            eventAggregator.GetEvent<OpenResourceByIdEvent>().Subscribe(OpenResourceById);
        }
开发者ID:transformersprimeabcxyz,项目名称:cslacontrib-MarimerLLC,代码行数:34,代码来源:ResourceUseCase.cs

示例9: HelpAndInfoModule

        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="unityContainer">The Unity container.</param>
        /// <param name="regionManager">The region manager.</param>
        public HelpAndInfoModule(IUnityContainer unityContainer, IRegionManager regionManager)
            : base(unityContainer, regionManager)
        {
            // Register views
            regionManager.RegisterViewWithRegion(RegionNames.RightWindowCommandsRegion, typeof(Views.ShellTitlebarRightWindowCommands));

            // Register for navigation
            Prism.Unity.UnityExtensions.RegisterTypeForNavigation<Views.SystemInfo>(unityContainer, ViewNames.SystemInformationView);
        }
开发者ID:steve600,项目名称:VersatileMediaManager,代码行数:14,代码来源:HelpAndInfoModule.cs

示例10: Initialize

        public void Initialize()
        {
            container = ServiceLocator.Current.GetInstance<IUnityContainer>();
            regionManager = ServiceLocator.Current.GetInstance<IRegionManager>();

            container.RegisterType<WholeControlViewModel, WholeControlViewModel>(new ContainerControlledLifetimeManager());

            regionManager.RegisterViewWithRegion("MainWindow", typeof(Views.WholeControlView));
        }
开发者ID:tvannuland,项目名称:AlgoLifter,代码行数:9,代码来源:DisplayCommanderModule.cs

示例11: PvrManagementModule

        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="unityContainer">The Unity container.</param>
        /// <param name="regionManager">The region manager.</param>
        public PvrManagementModule(IUnityContainer unityContainer, IRegionManager regionManager)
            : base(unityContainer, regionManager)
        {
            // Register PVR-Manamgent Commands
            this.UnityContainer.RegisterType<IPvrManagementCommands, PvrManagementCommandsProxy>();

            // Register-Services
            this.UnityContainer.RegisterType<IEnigma2WebInterfaceQueuingService, Enigma2WebInterfaceQueuingService>(ServiceNames.Enigma2WebInterfaceQueuingService, new ContainerControlledLifetimeManager());

            // Register Home-View
            regionManager.RegisterViewWithRegion(RegionNames.MainRegion, typeof(Views.PvrManagementHome));

            // Register flyouts
            regionManager.RegisterViewWithRegion(RegionNames.FlyoutRegion, typeof(Views.PvrManagementFlyout));

            // Register Popups
            Prism.Unity.UnityExtensions.RegisterTypeForNavigation<Views.AddTimerPopup>(this.UnityContainer, ViewNames.AddTimerView);
        }
开发者ID:steve600,项目名称:VersatileMediaManager,代码行数:23,代码来源:PvrManagementModule.cs

示例12: LocalMediaManagementModule

 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="unityContainer">The Unity container.</param>
 /// <param name="regionManager">The region manager.</param>
 public LocalMediaManagementModule(IUnityContainer unityContainer, IRegionManager regionManager)
     : base(unityContainer, regionManager)
 {
     regionManager.RegisterViewWithRegion(RegionNames.MainRegion, typeof(Views.LocalMediaManagementHome));
 }
开发者ID:steve600,项目名称:VersatileMediaManager,代码行数:10,代码来源:LocalMediaManagementModule.cs

示例13: InitializeRegionManager

 protected override void InitializeRegionManager(IRegionManager regionManager)
 {
     regionManager.RegisterViewWithRegion(RegionNames.MainShellRegion, typeof(ILoginView));
 }
开发者ID:alekseysukharev,项目名称:bank,代码行数:4,代码来源:AuthenticationModule.cs

示例14: ModuleInit

 public ModuleInit(IRegionManager regionManager)
 {
     regionManager.RegisterViewWithRegion(Names.ShellMenuRegion, typeof (ApplicationMenuView));
 }
开发者ID:George-Andras,项目名称:HomeInventories,代码行数:4,代码来源:HI.VirtualDesk.GUIModule.cs

示例15: ShellViewModel

        /// <summary>
        /// Initializes a new instance of the <see cref="ShellViewModel"/> class.
        /// </summary>
        /// <param name="accessControlManager">The access control manager.</param>
        /// <param name="signOffService">The sign off service.</param>
        /// <param name="userDialogService">The user dialog service.</param>
        /// <param name="regionManager">The region manager.</param>
        /// <param name="regionNavigationService">The region navigation service.</param>
        /// <param name="navigationService">The navigation service.</param>
        /// <param name="commandFactory">The command factory.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        public ShellViewModel(
            IAccessControlManager accessControlManager,
            ISignOffService signOffService,
            IUserDialogService userDialogService,
            IRegionManager regionManager,
            IRegionNavigationService regionNavigationService,
            INavigationService navigationService,
            ICommandFactory commandFactory,
            IEventAggregator eventAggregator)
        {
            _regionManager = regionManager;
            _signOffService = signOffService;
            _userDialogService = userDialogService;
            _regionNavigationService = regionNavigationService;
            _navigationService = navigationService;

            var commandFactoryHelper = CommandFactoryHelper.CreateHelper ( this, commandFactory );

            OpenMessageCenterWorkspaceCommand = commandFactoryHelper.BuildDelegateCommand(
                () => OpenMessageCenterWorkspaceCommand, ExecuteOpenMessageCenterWorkspace);
            OpenPatientAccessHistoryWorkspaceCommand = commandFactoryHelper.BuildDelegateCommand (
                () => OpenPatientAccessHistoryWorkspaceCommand, ExecuteOpenPatientAccessHistoryWorkspace );
            OpenInteroperabilityWorkspaceCommand = commandFactoryHelper.BuildDelegateCommand (
                () => OpenInteroperabilityWorkspaceCommand, ExecuteOpenInteroperabilityWorkspace );
            OpenAgencyWorkspaceCommand = commandFactoryHelper.BuildDelegateCommand (
                () => OpenAgencyWorkspaceCommand, ExecuteOpenAgencyWorkspaceCommand );
            OpenPatientListCommand = commandFactoryHelper.BuildDelegateCommand ( () => OpenPatientListCommand, ExecuteOpenPatientListCommand );
            OpenPatientReminderCommand = commandFactoryHelper.BuildDelegateCommand (
                () => OpenPatientReminderCommand, ExecuteOpenPatientReminderCommand );
            OpenMuObjectivesCommand = commandFactoryHelper.BuildDelegateCommand ( () => OpenMuObjectivesCommand, ExecuteOpenMuObjectivesCommand );
            OpenCdsEditorCommand = commandFactoryHelper.BuildDelegateCommand ( () => OpenCdsEditorCommand, ExecuteOpenCdsEditorCommand );
            OpenReportsWorkspaceCommand = commandFactoryHelper.BuildDelegateCommand (
                () => OpenReportsWorkspaceCommand, ExecuteOpenReportsWorkspaceCommand );
            OpenRoleManagementWorkspaceCommand = commandFactoryHelper.BuildDelegateCommand (
                () => OpenRoleManagementWorkspaceCommand, ExecuteOpenRoleManagementWorkspaceCommand );
            OpenBillingWorkspaceCommand = commandFactoryHelper.BuildDelegateCommand(
                () => OpenBillingWorkspaceCommand, ExecuteOpenBillingWorkspaceCommand);
            OpenBillingAdministrationWorkspaceCommand = commandFactoryHelper.BuildDelegateCommand(
                () => OpenBillingAdministrationWorkspaceCommand, ExecuteOpenBillingAdministrationWorkspaceCommand, () => _hasBillingOffice);
            LogoutCommand = commandFactoryHelper.BuildDelegateCommand ( () => LogoutCommand, ExecuteLogout );

            _regionNavigationService.NavigationFailed += RegionNavigationFailed;

            ApplyContextChanges = true;

            _regionManager.RegisterViewWithRegion ( "WorkspacesRegion", typeof( HomePageView ) );

            eventAggregator.GetEvent<HasBillingOfficeEvent>().Subscribe(HandleHasBillingOfficeEvent, true);
        }
开发者ID:divyang4481,项目名称:REM,代码行数:60,代码来源:ShellViewModel.cs


注:本文中的IRegionManager.RegisterViewWithRegion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。