コード例 #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;
        }
コード例 #2
0
        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;
        }