private void BattleField_MouseLeave(object sender, MouseEventArgs e) { boxes.SetBoxColor(sender as StackPanel, boxes.GetBoxLastColor(sender as StackPanel)); }