public void Notification() { TBikeDAL MyDAL = new TBikeDAL(); MyDAL.bindListBoxCustomer(LBRent); button.Content = "Current Bookings" + " (" + LBRent.Items.Count.ToString() + ")"; }
private void button_Click(object sender, RoutedEventArgs e) { //popup button to refresh the listbox TBikeDAL MyDAL = new TBikeDAL(); MyDAL.bindListBoxCustomer(LBRent); if (button.IsChecked == true) { button.Background = Brushes.White; LBRent.Visibility = Visibility.Visible; button.Foreground = Brushes.Black; } else if (button.IsChecked == false) { LBRent.Visibility = Visibility.Hidden; button.Background = Brushes.Black; button.Foreground = Brushes.White; } }