예제 #1
0
        public Shell()
        {
            InitializeComponent();

            DataContextChanged += (s, e) =>
            {
                Bindings.Update();
            };

            SolutionExplorerTabView.TabItemsChanged += (s, e) => SolutionExplorerColumnDefinition.Width = GridLength.Auto;


            TitleBarShadow.Receivers.Add(ContentPanel);
            SolutionExplorerShadow.Receivers.Add(AssetEditorPanel);

            TitleBarPanel.Translation         += new Vector3(0.0f, 0.0f, 32.0f);
            SolutionExplorerPanel.Translation += new Vector3(0.0f, 0.0f, 32.0f);

            Window.Current.SetTitleBar(TitleBar);

            EngineAssetViewFactory factory = new EngineAssetViewFactory();

            factory.Add(typeof(Entity), new SceneViewFactory());

            AssetViewFactory.Default.Add(".xaml", factory);

            RegisterMessages();
        }
예제 #2
0
        public SolutionExplorerViewModel()
        {
            OpenCommand           = new RelayCommand <StorageItemViewModel>(file => _ = OpenAsync(file));
            ViewCodeCommand       = new RelayCommand <StorageFileViewModel>(file => _ = ViewCodeAsync(file));
            DeleteCommand         = new RelayCommand <StorageItemViewModel>(Delete);
            ShowPropertiesCommand = new RelayCommand <StorageItemViewModel>(ShowProperties);

            RefreshCommand = new RelayCommand(() => _ = RefreshAsync(), () => RootFolder != null);

            EngineAssetViewFactory engineAssetViewFactory = new EngineAssetViewFactory();

            engineAssetViewFactory.Add(typeof(Entity), new SceneEditorViewFactory());

            CodeEditorViewFactory codeEditorViewFactory = new CodeEditorViewFactory();

            EditorViewFactory.Default.Add(".xaml", engineAssetViewFactory);
            EditorViewFactory.Default.Add(".cs", codeEditorViewFactory);
        }