Editor Projects
Role
The editor codebase is split across sources/presentation/ (MVVM framework, shared controls, Quantum-to-UI binding) and sources/editor/ (editor infrastructure and concrete asset editors, while each engine plugin's projects, from its runtime to its Assets and Editor packages, live under sources/plugins/<Name>/). WPF is the only supported view layer, but ViewModels are written to be platform-agnostic. This file maps each project to its responsibility and WPF coupling status.
The WPF Boundary
Rule: Anything in a ViewModel subclass (AssetEditorViewModel, INodePresenterUpdater, etc.) must not reference WPF types (DependencyObject, FrameworkElement, Dispatcher, etc.). WPF coupling belongs in:
- XAML files and code-behind implementing
IEditorView - WPF-specific service implementations, controls, and behaviors in
Stride.Core.Presentation.Wpf
Exceptions exist in the codebase for historical reasons. Do not add new ones.
Project Map
Assembly names match project names throughout; the "same" shorthand in the Assembly column indicates this.
| Project | Assembly | WPF | Responsibility |
|---|---|---|---|
Stride.Core.Presentation |
same | No | MVVM base classes (ViewModelBase, DispatcherViewModel), service interfaces (IDispatcherService), commands, dirtiables |
Stride.Core.Presentation.Wpf |
same | Yes | WPF controls, converters, behaviors, WpfDispatcherService |
Stride.Core.Presentation.Quantum |
same | No | Quantum-to-ViewModel binding — INodePresenter, node presenter updater infrastructure; platform-agnostic layer consumed by the WPF property grid |
Stride.Core.Presentation.Wpf.Graph |
same | Yes | Node-graph visualization controls (used by GraphicsCompositor editor) |
Stride.Core.Presentation.Wpf.Dialogs |
same | Yes | Dialog services and file picker implementations |
Stride.Core.Assets.Editor.Wpf |
same | Yes* | Base editor infrastructure: AssetEditorViewModel, IEditorView, AssetsEditorPlugin, SelectionService, IUndoRedoService, registration attributes; *project targets WPF but ViewModel base classes are platform-agnostic |
Stride.Assets.Editor.Wpf |
same | Yes | All concrete asset editors (ViewModels + Views), StrideDefaultAssetsWpfPlugin, node presenter updaters |
Stride.Editor.Wpf |
same | Yes | Core editor wiring and game-editor infrastructure |
Stride.GameStudio |
same | Yes | Shell, AssetEditorsManager, PluginService, main window |
Stride.*.Editor (sources/plugins/<Name>/) |
same | Yes* | Editor package of an engine plugin (Stride.Audio, Stride.Particles, Stride.Physics, Stride.SpriteStudio, Stride.UI, Stride.Video, Stride.Voxels): plugin class, icons, gizmos, previews, thumbnails, the plugin's asset editors; *builds on the WPF editor assemblies, holds no views |
Stride.*.Editor.Wpf (sources/plugins/<Name>/) |
same | Yes | WPF views of a plugin's Editor package (Stride.Audio.Editor.Wpf, Stride.UI.Editor.Wpf); see plugins.md |
Where to Put New Code
- New ViewModel code →
Stride.Assets.Editor.Wpf, undersources/editor/Stride.Assets.Editor.Wpf/AssetEditors/%%EditorName%%/ViewModels/ - New View / XAML code → same project,
AssetEditors/%%EditorName%%/Views/ - Editor code for a plugin's asset → the plugin's
Editorpackage (sources/plugins/%%Plugin%%/Stride.%%Plugin%%.Editor/), its views in theEditor.Wpfcompanion