public SceneViewerControl()
        {
            Tabs = new ObservableCollection<SceneTabViewModel>();

            RemoveTab = new RelayCommand((obj) =>
            {
                Tabs.Remove(obj as SceneTabViewModel);
                //MessageBox.Show("New Folder!");
            });

            InitializeComponent();
            AssignPanelEventHandling(xna);

            ScenesControl.ItemsSource = Tabs;

            if (DesignerProperties.GetIsInDesignMode(this))
                return;

            _game = new MyGame(xna.Handle);
            _game.GameWorld.UpdateWorld = false;
            _context = _game.GraphicsContext;

            var gameWorldArg =
                new ConstructorArgument(
                    ApplicationProperties.ISceneViewerGameWorldArgName,
                    _game.GameWorld);
            _controller = DependencyInjectorHelper
                            .MainWindowKernel
                            .Get<ISceneViewerController>(gameWorldArg);
            _controller.Control = this;
        }
        private void LoadedHandler(object sender, RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;

            _game = new MyGame(ParticleEditor.Handle);

            var controlArg =
                new ConstructorArgument(
                    ApplicationProperties.IParticleEditorControllerGameWorldArgName,
                    _game.GameWorld);

            _particleController =
                DependencyInjectorHelper
                    .ParticleEditorKernel
                    .Get<IParticleEditorController>(controlArg);

            _particleController.ParticleEditorControl = this;

            /*_transformModeModel =
                DependencyInjectorHelper
                    .ParticleEditorKernel
                    .Get<TransformModeViewModel>();

            TranslateButton.DataContext = _transformModeModel;
            FreeMovementButton.DataContext = _transformModeModel;
            RotateButton.DataContext = _transformModeModel;
            ScaleButton.DataContext = _transformModeModel;*/
        }
        private void LoadedHandler(object sender, RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;

            _game = new MyGame(PuppeteerEditor.Handle);
            _game.GameWorld.UpdateWorld = false;
            var controlArg =
                new ConstructorArgument(
                    ApplicationProperties.IPuppeteerControllerGameWorldArgName,
                    _game.GameWorld);

            PuppeteerController =
                DependencyInjectorHelper
                            .PuppeteerKernel
                            .Get<IPuppeteerController>(controlArg);
            //_puppeteerController.GameWorld = _game.GameWorld;

            PuppeteerController.PuppeteerControl = this;

            if (OnLoaded != null)
                OnLoaded(this);

            SelectBoneMode.IsChecked = true;

            _transformModeModel =
                DependencyInjectorHelper
                    .PuppeteerKernel
                    .Get<TransformModeViewModel>();

            TranslateButton.DataContext = _transformModeModel;
            FreeMovementButton.DataContext = _transformModeModel;
            RotateButton.DataContext = _transformModeModel;
            ScaleButton.DataContext = _transformModeModel;

            _workingModesModel =
                DependencyInjectorHelper
                    .PuppeteerKernel
                    .Get<PuppeteerWorkingModesModel>();

            SelectBoneMode.DataContext = _workingModesModel;
            SelectAssetMode.DataContext = _workingModesModel;
            AddBoneMode.DataContext = _workingModesModel;
        }