/// <summary> /// initialize the Cell /// </summary> public PlayerCell(Player player) { InitializeComponent(); Data = new PlayerCellWrapper(player); //try //{ // Color fill = Color.FromArgb(255, player.ColorR, player.ColorG, player.ColorB); // R_Background.Fill = new SolidColorBrush(fill); //} //catch (Exception) { } CB_PlaceSelector.ItemsSource = PlacementOptions; try { OnPlayerChanged(); OnSmasherChanged(); } catch (Exception e) { MessageBox.Show("There was an error creating the PlayerCell: " + e.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }