private void AddAnimationFrameControls()
        {
            RemoveFontTextureControls(true);

            RemoveAnimationFrameControls(true);

            m_comboBox_animationFrameDefinition = new UserControl_NewAndSelect<AnimationFrameDefinition>(m_selectedAnimationStateDefinition.AnimationFrames, NewAnimationFrameDefinition, SelectAnimationFrameDefinition);
            m_grid_main.SetRowColumn(m_comboBox_animationFrameDefinition, 0, 1);
        }
        private void AddFontControls()
        {
            RemoveAnimationStateControls(true);

            RemoveFontTextureControls(true);

            var g = m_selectedGraphicsInstanceDefinition as GraphicsInstanceDefinition_WithFontTextureDefinitions;
            m_comboBox_fontTextureDefinition = new UserControl_NewAndSelect<FontTextureDefinition>(g.FontTextures, NewFontTextureDefinition, SelectFontTextureDefinition);
            m_grid_main.SetRowColumn(m_comboBox_fontTextureDefinition, 0, 1);
        }
        private void CreateControls()
        {
            m_grid_main = new Grid();
            m_grid_main.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });
            m_grid_main.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(100.0, GridUnitType.Star) });

            ////////
            // ComboBox
            m_comboBox_physicsInstanceDefinitions = new UserControl_NewAndSelect<PhysicsInstanceDefinition>(DataManager.PhysicsInstanceDefinitions, New, Select);
            m_grid_main.SetRowColumn(m_comboBox_physicsInstanceDefinitions, 0, 0);

            ////////
            // Fin
            Content = m_grid_main;
        }
        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 RemoveFontTextureControls(bool removeComboBox)
        {
            if (m_userControl_fontTextureDefinition != null)
                m_grid_main.Children.Remove(m_userControl_fontTextureDefinition);
            m_userControl_fontTextureDefinition = null;

            if (removeComboBox)
            {
                if (m_comboBox_fontTextureDefinition != null)
                    m_grid_main.Children.Remove(m_comboBox_fontTextureDefinition);
                m_comboBox_fontTextureDefinition = null;
            }
        }
        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);
        }