Пример #1
0
 private void HidenSearch_MouseUp(object sender, MouseButtonEventArgs e)
 {
     if (!NotesBrowser.IsVisible)
     {
         searchPanel.Hide();
     }
     else
     {
         MainContainer.Children.Remove(searchPanel);
     }
     SearchSelector.RestoreOriginalState(this);
     searchPanel = null;
 }
Пример #2
0
 private void MenuSearch_Click(object sender, RoutedEventArgs e)
 {
     if (searchPanel == null)
     {
         searchPanel = new SearchPanel(this);
         searchPanel.HidenSearch.MouseUp += HidenSearch_MouseUp;
         searchPanel.Show();
         searchPanel.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
         searchPanel.VerticalAlignment   = VerticalAlignment.Stretch;
         Grid.SetColumn(searchPanel, 2);
         Grid.SetRowSpan(searchPanel, 2);
         System.Windows.Controls.Panel.SetZIndex(searchPanel, 1);
         MainContainer.Children.Add(searchPanel);
     }
     if (!TextBox.MainControl.IsReadOnly && !string.IsNullOrWhiteSpace(TextBox.MainControl.Selection.Text))
     {
         searchPanel.GetSearchResalt(TextBox.MainControl.Selection.Text);
     }
 }