示例#1
0
        public void ShowCommand(bool visible)
        {
            var t = visible ? Visibility.Visible : Visibility.Hidden;

            BdSearch.Visibility = t;
            //BdResult.Visibility = t;

            if (visible)
            {
                var tmp = BdWindow.Tag as WindowProperty;
                BdWindow.Background  = tmp.BgBrush;
                BdWindow.BorderBrush = tmp.BdBrush;
                TbSearch.Focus();
                TbSearch.SelectAll();
            }
            else
            {
                BdWindow.Tag = new WindowProperty()
                {
                    BgBrush = BdWindow.Background, BdBrush = BdWindow.BorderBrush
                };
                BdWindow.Background  = Brushes.Transparent;
                BdWindow.BorderBrush = Brushes.Transparent;
            }
        }
示例#2
0
 private void ButtonOk_OnClick(object sender, RoutedEventArgs e)
 {
     if (TbSearch.Focus())
     {
         TbSearch.SelectAll();
     }
     if (System.Windows.Interop.ComponentDispatcher.IsThreadModal)
     {
         DialogResult = true;
     }
 }