using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace MyApp.UserPages { /// <summary> /// Логика взаимодействия для UserItems.xaml /// </summary> public partial class UserItems : Page { public UserItems() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { Window ownerWindow = Application.Current.Windows.OfType<Window>().SingleOrDefault(w => w.Title == "MainWindow"); ownerWindow.Close(); } private void Button_Click_1(object sender, RoutedEventArgs e) { Window ownerWindow = Application.Current.Windows.OfType<Window>().SingleOrDefault(w => w.Title == "MainWindow"); ownerWindow.WindowState = WindowState.Minimized; } private void SearchTB_MouseEnter(object sender, MouseEventArgs e) { if (SearchTB.Text == "Поиск...") { SearchTB.Text = ""; SearchTB.Foreground = Brushes.White; } } private void SearchTB_MouseLeave(object sender, MouseEventArgs e) { if (SearchTB.Text == "") { SearchTB.Text = "Поиск..."; SolidColorBrush sb = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#6BFFFFFF")); SearchTB.Foreground = sb; } } private void ItemsPageButton_Click(object sender, RoutedEventArgs e) { NavigationService.Navigate(new UserItems()); } private void OrdersPageButton_Click(object sender, RoutedEventArgs e) { NavigationService.Navigate(new UserOrders()); } } }