Ejemplo n.º 1
0
        public ColorPickerViewModel()
        {
            StandardColorClickedCommand = new RelayCommandWithParameter((param) => ChangeSelectedColor(param));

            StandardColors = new ObservableCollection <SolidColorBrush>();

            FillStandardColorsList();
        }
Ejemplo n.º 2
0
        public SearchSectionViewModel()
        {
            SearchCommand = new RelayCommandWithParameter((param) => { Search(IoC.Kernel.Get <CustomRichTextBox>().Document); });

            IoC.Kernel.Get <IEventAggregator>().GetEvent <ToggleSearchSectionVisibilityEvent>().Subscribe(() => IsVisible ^= true);
        }
Ejemplo n.º 3
0
 public InsertSubmenuViewModel(FlowDocument document, Point popupPlacement, TextSelection selectedText)
 {
     InsertImageCommand = new RelayCommandWithParameter((param) => { InsertImage(document); });
     InsertLinkCommand  = new RelayCommandWithParameter((param) => { InsertLink(selectedText, popupPlacement); });
     InsertFileCommand  = new RelayCommand(() => { IoC.Kernel.Get <AttachmentsSectionViewModel>().InsertFileFromDialog(); });
 }