private void AdManageGifts_OnMouseEnter(object sender, MouseEventArgs e) { var button = (Button)sender; if (GiftManager.ListAllGifts().Count == 0) { button.IsEnabled = false; button.Background = Brushes.Crimson; button.ToolTip = "No gifts are added yet"; Thread.Sleep(50); } e.Handled = true; }
public ListGifts() { this.InitializeComponent(); this.dgUsers.ItemsSource = GiftManager.ListAllGifts(); }