ivandrofly

Project folder structure for wpf application

Aug 3rd, 2023
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. A typical folder structure for a WPF (Windows Presentation Foundation) application could look like this:
  2.  
  3. MyWpfApplication (Solution Folder)
  4. ├── MyWpfApplication (WPF Project)
  5. │ ├── App.xaml
  6. │ ├── MainWindow.xaml
  7. │ ├── Properties
  8. │ ├── Resources
  9. │ ├── App.config
  10. │ └── ...
  11. ├── ViewModel (Class Library)
  12. │ ├── MainViewModel.cs
  13. │ └── ...
  14. ├── Model (Class Library)
  15. │ ├── MyModel.cs
  16. │ └── ...
  17. ├── Services (Class Library)
  18. │ ├── DataService.cs
  19. │ └── ...
  20. ├── Tests (Unit Testing Project)
  21. │ └── ...
  22. └── MyWpfApplication.sln
  23.  
  24.  
  25. MyWpfApplication (WPF Project): This is the WPF project housing your application. It should include XAML files for your UI, such as App.xaml and MainWindow.xaml.
  26. ViewModel (Class Library): This is where your ViewModels go, following the MVVM (Model-View-ViewModel) pattern. They are essentially the logic behind the UI, the bridge between the Model and the View.
  27. Model (Class Library): This is where your Models go in the MVVM pattern. These are typically representations of the objects you'll be working with.
  28. Services (Class Library): This project typically houses various services the app may need, such as Data Services, APIs, etc.
  29. Tests (Unit Testing Project): This is where your unit tests would go, to ensure that methods and classes work as expected.
  30. Please note that you could use JetBrains Rider for working with WPF applications and benefit from its robust code analysis, intelligent code completion, real-time type-checking, and powerful refactoring capabilities.
Add Comment
Please, Sign In to add comment