private void AddAnimationStateControls()
        {
            RemoveFontTextureControls(true);

            RemoveAnimationStateControls(true);

            var g = m_selectedGraphicsInstanceDefinition as GraphicsInstanceDefinition_WithAnimationStateDefinitions;
            m_comboBox_animationStateDefinition = new UserControl_NewAndSelect<AnimationStateDefinition_WithAnimationFrameDefinitions>(g.AnimationStates, NewAnimationStateDefinition, SelectAnimationStateDefinition);
            m_comboBox_animationStateDefinition.SelectionChanged += ComboBox_AnimationStateDefinition_SelectionChanged;
            m_grid_main.SetRowColumn(m_comboBox_animationStateDefinition, 2, 0);

            if (m_comboBox_animationStateDefinition.SelectedItem != null)
            {
                m_selectedAnimationStateDefinition = m_comboBox_animationStateDefinition.SelectedItem;
                AddAnimationFrameControls();
            }
        }
 private void ComboBox_AnimationStateDefinition_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     var comboBox = sender as UserControl_NewAndSelect<AnimationStateDefinition_WithAnimationFrameDefinitions>;
     if (comboBox != null && comboBox == m_comboBox_animationStateDefinition)
     {
         m_selectedAnimationStateDefinition = m_comboBox_animationStateDefinition.SelectedItem;
         if(m_selectedAnimationStateDefinition != null)
             AddAnimationFrameControls();
     }
 }
 private void SelectAnimationStateDefinition(AnimationStateDefinition_WithAnimationFrameDefinitions animationStateDefinition)
 {
     RemoveAnimationStateControls(false);
     m_userControl_animationStateDefinition = new UserControl_AnimationStateDefinition(animationStateDefinition.AnimationStateDefinition);
     m_userControl_animationStateDefinition.NewDataAddedEvent += UserControl_AnimationStateDefinition_NewDataAdded;
     m_userControl_animationStateDefinition.ExistingDataUpdatedEvent += UserControl_AnimationStateDefinition_ExistingDataUpdated;
     m_grid_main.SetRowColumn(m_userControl_animationStateDefinition, 3, 0);
 }