Beispiel #1
0
        private void Filter_GotFocus(object sender, EventArgs e)
        {
            if (FilterTaskText == "Поиск...")
            {
                FilterTaskText = "";
            }
            else
            {
                FilterTBox.Dispatcher.BeginInvoke(new Action(() => FilterTBox.SelectAll()));
            }

            FilterTBox.Foreground = Brushes.Black;
        }
        private void Filter_GotFocus(object sender, EventArgs e)//происходит когда элемент стает активным
        {
            if (((ViewModel.TasksFaveViewModel)DataContext).FilterTaskText == "Поиск...")
            {
                ((ViewModel.TasksFaveViewModel)DataContext).FilterTaskText = "";
            }
            else
            {
                FilterTBox.Dispatcher.BeginInvoke(new Action(() => FilterTBox.SelectAll()));
            }

            FilterTBox.Foreground = Brushes.Black;
        }
Beispiel #3
0
 private void manager_Loaded(object sender, RoutedEventArgs e)
 {
     FilterTBox.Focus();
 }