コード例 #1
0
        public ColorPickerViewModel()
        {
            StandardColorClickedCommand = new RelayCommandWithParameter((param) => ChangeSelectedColor(param));

            StandardColors = new ObservableCollection <SolidColorBrush>();

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

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