Esempio n. 1
0
        public PropertyPageViewModel()
        {
            if (this.IsInDesignMode)
            {
                return;
            }
            _ListEventAggregator = ServiceLocator.Current.GetInstance <IEventAggregator>();;
            _ListEventAggregator.GetEvent <SelectionChangeEvent>().Subscribe(SelectionChangeEventHandler);
            _ListEventAggregator.GetEvent <SelectionPropertyChangeEvent>().Subscribe(SelectionPropertyEventHandler);
            _ListEventAggregator.GetEvent <SelectionPageChangeEvent>().Subscribe(SelectionPageChangeEventHandler);

            _model = new PropertyPageModel();
            this.ImportImgCommand = new DelegateCommand <object>(ImportImgCommandHandler);
            this.ClearImgCommand  = new DelegateCommand <object>(ClearImgCommandHandler);

            fontSizeList = new List <int>();
            fontSizeList.Add(8);
            fontSizeList.Add(9);
            fontSizeList.Add(10);
            fontSizeList.Add(11);
            fontSizeList.Add(12);
            fontSizeList.Add(14);
            fontSizeList.Add(16);
            fontSizeList.Add(18);
            fontSizeList.Add(20);
            fontSizeList.Add(22);
            fontSizeList.Add(24);
            fontSizeList.Add(28);
            fontSizeList.Add(36);
            fontSizeList.Add(48);
            fontSizeList.Add(72);
        }
Esempio n. 2
0
 public static PropertyPageModel GetInstance()
 {
     if (_instance == null)
     {
         _instance = new PropertyPageModel();
     }
     return(_instance);
 }
Esempio n. 3
0
        public PropertyPageViewModel()
        {
            if (this.IsInDesignMode)
            {
                return;
            }
            _ListEventAggregator.GetEvent <SelectionChangeEvent>().Subscribe(SelectionChangeEventHandler);
            _ListEventAggregator.GetEvent <SelectionPropertyChangeEvent>().Subscribe(SelectionPropertyEventHandler);
            _ListEventAggregator.GetEvent <SelectionPageChangeEvent>().Subscribe(SelectionPageChangeEventHandler);

            _model = PropertyPageModel.GetInstance();

            _selectionService = ServiceLocator.Current.GetInstance <SelectionServiceProvider>();
            _ListEventAggregator.GetEvent <EnableFirePositionInRibbonEvent>().Subscribe(EnableFirePositionHandler);
        }