예제 #1
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if (isSearchPalleteOpen == false)
            {
                //Check whether the search may start or not
                if (e.Key != Key.Escape && e.Key != Key.F1)
                {
                    //Start the Search Pallete
                    SearchPallete.IsEnabled        = true;
                    SearchPallete.IsHitTestVisible = true;

                    //Reset the Search Query Text
                    SearchQueryText.Text = "";

                    //Animate the Search Pallete
                    DoubleAnimation da = new DoubleAnimation(0, 1d, TimeSpan.FromMilliseconds(500));
                    da.EasingFunction = new QuinticEase();
                    SearchPallete.BeginAnimation(OpacityProperty, da);

                    //Focus to the SearchQueryText to input the text
                    SearchQueryText.Focus();

                    isSearchPalleteOpen = true;
                }
                else
                {
                    if (e.Key == Key.F1)
                    {
                        //Help is requested, Load the local / server help documentation.
                        //TODO:Create help docs and link it here
                    }
                }
            }
        }
예제 #2
0
 private void SearchQueryTextPanel_MouseClick(object sender, MouseEventArgs e)
 {
     // сфокусироваться на текст при нажатии на панель
     if (e.Button == MouseButtons.Left)
     {
         SearchQueryText.Focus();
     }
 }
예제 #3
0
        private void Search_Button_MouseUp(object sender, MouseButtonEventArgs e)
        {
            //Start the Search Pallete
            SearchPallete.IsEnabled        = true;
            SearchPallete.IsHitTestVisible = true;

            //Reset the Search Query Text
            SearchQueryText.Text = "";

            //Animate the Search Pallete
            DoubleAnimation da = new DoubleAnimation(0, 1d, TimeSpan.FromMilliseconds(500));

            da.EasingFunction = new QuinticEase();
            SearchPallete.BeginAnimation(OpacityProperty, da);

            //Focus to the SearchQueryText to input the text
            SearchQueryText.Focus();

            isSearchPalleteOpen = true;
        }