예제 #1
0
 public SearchTextViewModel()
 {
     mOsk  = Pici.Services.Get <IOsk>();
     Style = new ViewStyle("SearchBoxTextStyle");
     EnterSearchCommand = new EnterSearchCommand();
     TouchDownCommand   = new DelegateCommand((p) =>
     {
         mIsTouch = true;
         mOsk.open();
     });
     MouseDownCommand = new DelegateCommand((p) =>
     {
         if (!mIsTouch)
         {
             mOsk.open();
         }
         mIsTouch = false;
     });
     GotFocusCommand             = new DelegateCommand((p) => { EnterSearchCommand.CanExecuteProp = true; });
     LostFocusCommand            = new DelegateCommand((p) => { EnterSearchCommand.CanExecuteProp = false; });
     EnterSearchCommand.OnEnter += OnEnter;
 }
예제 #2
0
 private void OnEnter(EnterSearchCommand sender)
 {
     mOsk.close();
 }