示例#1
0
        public void BeforeDoubleClick(Range target, HandledIndicator handled)
        {
            handled.MarkHandled();

            if (IsDisabled)
            {
                return;
            }

            var viewModel = new DateEditorPopupViewModel {
                Value = Value
            };

            var dialogResult = Popup.ShowDialog(w =>
            {
                var view = new DateEditorPopupView {
                    DataContext = viewModel
                };
                view.ValueSelected += () => w.DialogResult = true;
                return(view);
            });

            if (dialogResult == true)
            {
                Value = viewModel.Value;
            }
        }
示例#2
0
        public void BeforeDoubleClick(Range target, HandledIndicator handled)
        {
            var selectedIndex = Values.IndexOf(SelectedValue);

            SelectedValue = Values[(selectedIndex + 1) % Values.Count];
            handled.MarkHandled();
        }
示例#3
0
 public void BeforeDoubleClick(Range target, HandledIndicator handled)
 {
     if (target.Application.Intersect(target, Range) != null)
     {
         Clicked?.Invoke();
         handled.MarkHandled();
     }
 }