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; }
private void OnEnter(EnterSearchCommand sender) { mOsk.close(); }