Esempio n. 1
0
        public void Initialize()
        {
            _eventAggregator.GetEvent <SplashScreenUpdateEvent>().Publish(new SplashScreenUpdateEvent {
                Text = "Loading Properties..."
            });

            _container.RegisterType <PropertiesViewModel>(new ContainerControlledLifetimeManager());
            _container.RegisterType <IPropertiesToolboxToolbarService, PropertiesToolboxToolbarService>(new ContainerControlledLifetimeManager());
            _container.RegisterType <IPropertyGrid, PropertiesViewModel>(new ContainerControlledLifetimeManager());

            IWorkspace workspace = _container.Resolve <DefaultWorkspace>();

            _propertiesViewModel      = _container.Resolve <PropertiesViewModel>();
            _propertiesToolbarService = _container.Resolve <IPropertiesToolboxToolbarService>();

            LoadCommands();
            LoadToolbar();

            workspace.Tools.Add(_propertiesViewModel);
        }
Esempio n. 2
0
        public PropertiesViewModel(IPropertiesToolboxToolbarService toolbarService,
                                   IEventAggregator aggregator,
                                   ICommandManager commandManager)
            : base(toolbarService)
        {
            IsValidationEnabled = false;

            _propertiesToolboxToolbar = toolbarService;
            _aggregator     = aggregator;
            _commandManager = commandManager;


            Name      = "Properties";
            Title     = "Properties";
            ContentId = "Properties";//TODO : Move to constants
            IsVisible = false;


            _view = new PropertiesView(this);
            View  = _view;
        }