Пример #1
0
        /// <summary>
        /// Inicializa una nueva instancia de la clase <see cref="T:TaskbarViewModel"/>.
        /// </summary>
        /// <param name="moduleType">
        /// Tipo de módulo al que pertenece este ViewModel.
        /// </param>
        /// <remarks>
        /// Constructor de la clase <see cref="T:TaskbarViewModel"/>.
        /// </remarks>
        protected TaskbarViewModel(Type moduleType)
        {
            if (!this.IsDesignTime)
            {
                // Inicialición.
                this.moduleType = moduleType;

                this.isChecked                  = false;
                this.showModuleNavigationView   = null;

                this.showModuleRibbonView       = null;//*
                this.moduleRibbonViewModel = null;//*

                this.taskButtonImage            = string.Empty;
                this.taskButtonText             = string.Empty;

                // Suscripción de eventos.
                var navigationCompletedEvent = this.EventAggregator.GetEvent<NavigationCompletedEvent>();
                navigationCompletedEvent.Subscribe(this.OnNavigationCompleted, ThreadOption.UIThread);
            }
        }
Пример #2
0
        /// <summary>
        /// Inicializa una nueva instancia de la clase <see cref="T:TaskbarViewModel"/>.
        /// </summary>
        /// <param name="moduleType">
        /// Tipo de módulo al que pertenece este ViewModel.
        /// </param>
        /// <remarks>
        /// Constructor de la clase <see cref="T:TaskbarViewModel"/>.
        /// </remarks>
        protected TaskbarViewModel(Type moduleType)
        {
            if (!this.IsDesignTime)
            {
                // Inicialición.
                this.moduleType = moduleType;

                this.isChecked = false;
                this.showModuleNavigationView = null;

                this.showModuleRibbonView  = null; //*
                this.moduleRibbonViewModel = null; //*

                this.taskButtonImage = string.Empty;
                this.taskButtonText  = string.Empty;

                // Suscripción de eventos.
                var navigationCompletedEvent = this.EventAggregator.GetEvent <NavigationCompletedEvent>();
                navigationCompletedEvent.Subscribe(this.OnNavigationCompleted, ThreadOption.UIThread);
            }
        }