本文整理汇总了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));
}
示例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));
}
示例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);
}
示例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));
}
示例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>());
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}
示例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));
}
示例13: InitializeRegionManager
protected override void InitializeRegionManager(IRegionManager regionManager)
{
regionManager.RegisterViewWithRegion(RegionNames.MainShellRegion, typeof(ILoginView));
}
示例14: ModuleInit
public ModuleInit(IRegionManager regionManager)
{
regionManager.RegisterViewWithRegion(Names.ShellMenuRegion, typeof (ApplicationMenuView));
}
示例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);
}