public ColorPickerViewModel() { StandardColorClickedCommand = new RelayCommandWithParameter((param) => ChangeSelectedColor(param)); StandardColors = new ObservableCollection <SolidColorBrush>(); FillStandardColorsList(); }
public SearchSectionViewModel() { SearchCommand = new RelayCommandWithParameter((param) => { Search(IoC.Kernel.Get <CustomRichTextBox>().Document); }); IoC.Kernel.Get <IEventAggregator>().GetEvent <ToggleSearchSectionVisibilityEvent>().Subscribe(() => IsVisible ^= true); }
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(); }); }