public void SetView(DescriptionsNavigationView view)
        {
            View = view;

            ActiveAware = new FocusActiveAwareAdapter(View);
            ActiveAware.IsActiveChanged             += (sender, e) => refreshCommandsIsActive();
            m_ShellView.ActiveAware.IsActiveChanged += (sender, e) => refreshCommandsIsActive();
        }
Exemplo n.º 2
0
        public DescriptionsNavigationPlugin(
            ILoggerFacade logger,
            IRegionManager regionManager,
            [Import(typeof(IUrakawaSession), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            IUrakawaSession session,
            [Import(typeof(IShellView), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            IShellView shellView,
            [Import(typeof(DescriptionsNavigationView), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            DescriptionsNavigationView pane,
            [Import(typeof(DescriptionsNavigationViewModel), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            DescriptionsNavigationViewModel viewModel
            )
        {
            m_Logger        = logger;
            m_RegionManager = regionManager;

            m_UrakawaSession           = session;
            m_ShellView                = shellView;
            m_DescriptionsNavView      = pane;
            m_DescriptionsNavViewModel = viewModel;

            // Remark: using direct access instead of delayed lookup (via the region registry)
            // generates an exception, because the region does not exist yet (see "parent" plugin constructor, RegionManager.SetRegionManager(), etc.)

            m_RegionManager.RegisterNamedViewWithRegion(RegionNames.NavigationPaneTabs,
                                                        new PreferredPositionNamedView
            {
                m_viewInstance          = m_DescriptionsNavView,
                m_viewName              = @"ViewOf_" + RegionNames.NavigationPaneTabs + @"_Descriptions",
                m_viewPreferredPosition = PreferredPosition.Last
            });

            //m_RegionManager.RegisterViewWithRegion(RegionNames.NavigationPaneTabs, typeof(IDescriptionsNavigationView));

            //IRegion targetRegion = m_RegionManager.Regions[RegionNames.NavigationPaneTabs];
            //targetRegion.Add(m_DescriptionsNavView);
            //targetRegion.Activate(m_DescriptionsNavView);

            //m_Logger.Log(@"Navigation pane plugin initializing...", Category.Debug, Priority.Medium);
        }
Exemplo n.º 3
0
 public DescriptionsNavigator(DescriptionsNavigationView view)
 {
     m_view = view;
 }