private void RemoveAnimationStateControls(bool removeComboBox)
        {
            if (m_userControl_animationStateDefinition != null)
            {
                m_grid_main.Children.Remove(m_userControl_animationStateDefinition);
                m_userControl_animationStateDefinition.NewDataAddedEvent -= UserControl_AnimationStateDefinition_NewDataAdded;
                m_userControl_animationStateDefinition.ExistingDataUpdatedEvent -= UserControl_AnimationStateDefinition_ExistingDataUpdated;
            }
            m_userControl_animationStateDefinition = null;

            if (removeComboBox)
            {
                if (m_comboBox_animationStateDefinition != null)
                    m_grid_main.Children.Remove(m_comboBox_animationStateDefinition);
                m_comboBox_animationStateDefinition = null;
            }

            RemoveAnimationFrameControls(true);
        }
 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);
 }
 private void NewAnimationStateDefinition()
 {
     RemoveAnimationStateControls(false);
     m_userControl_animationStateDefinition = new UserControl_AnimationStateDefinition(null);
     m_userControl_animationStateDefinition.NewDataAddedEvent += UserControl_AnimationStateDefinition_NewDataAdded;
     m_userControl_animationStateDefinition.ExistingDataUpdatedEvent += UserControl_AnimationStateDefinition_ExistingDataUpdated;
     m_grid_main.SetRowColumn(m_userControl_animationStateDefinition, 3, 0);
 }