Esempio n. 1
0
 private void FightersControl_LayoutUpdated(object sender, EventArgs e)
 {
     if (FightersControl.Items.Count != 0 && GlobalContext.Context.FightContext.TurnIndex == 0 && GlobalContext.Context.FightContext.RoundCount == 0)
     {
         ContentPresenter uiElement = (ContentPresenter)FightersControl.ItemContainerGenerator.ContainerFromIndex(0);
         GroupBox         gb        = (GroupBox)uiElement.GetFirstChildByName("CharacterTileGroupBoxControl");
         gb.Background                  = (Brush)Application.Current.Resources["Indigo"];
         gb.BorderThickness             = new Thickness(2);
         FightersControl.LayoutUpdated -= FightersControl_LayoutUpdated;
     }
 }