Beispiel #1
0
        public ColorPickerViewModel()
        {
            StandardColorClickedCommand = new RelayCommandWithParameter((param) => ChangeSelectedColor(param));

            StandardColors = new ObservableCollection <SolidColorBrush>();

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

            IoC.Kernel.Get <IEventAggregator>().GetEvent <ToggleSearchSectionVisibilityEvent>().Subscribe(() => IsVisible ^= true);
        }
Beispiel #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(); });
 }