DI and Views
I am not sure where I'm going wrong but I am trying to open a new view (window) from the main window but I am stuck with some unresolved issues in code.
I have the services configured and everything.
I have uploaded the source to Github.
https://github.com/coredreamstudios/TitanStudioWPF
Preview of the issue:
Thank you in advice.
GitHub
GitHub - coredreamstudios/TitanStudioWPF
Contribute to coredreamstudios/TitanStudioWPF development by creating an account on GitHub.

10 Replies
that is missing because it exists in
TitanStudio.Wpf
while your VM is in TitanStudio.Core
, so it does not know MatchRulesEditorView
is a type
i don't work much with WPF but the way you've organized this feels very sus
TitanStudio.Core
- depends on nothing, tries to use references from TitanStudio.Wpf
and contains a couple VMs
TitanStudio.Logic
- depends on nothing, also has a VM
TitanStudio.Wpf
- has all of your views, references the core project
so the only way for both your VMs and Views to know of each other is by creating circular references which seems like bad designso what can I do @Keswiik ?
sorry, fell asleep 😦

I got rid of the "DataLogic"
breaking shit down int 504354305430530 projects is a crazy confusing thing for ADHD'ers like myself
i don't think you really need to worry about breaking everything into super specific projects
i'd only be splitting them out if you have a reason to
I'm only gonna keep Core and Wpf then
Wpf is Views/Controls only
yes for now its best if u just keep Core and Wpf and dont overcomplicate things
as u go
is MainView even supposed to be used or your main window is MatchRulesEditorView?
because as far as I can see ur not using MainView
if so you would have
Make use of the default MainWindow Property.
I would also advise u drop using Interface for now to keep things simpler.
rather then trying to open a new window, are u sure u dont just want to navigate to another control?
You could for example in a "MainWindow" we usually call this the shell, have something like say
and in your LoginViewModel for example assuming your using CommunityToolkit.Mvvm you can use the messenger available there to communicate back to the ShellViewModel to move to another page.
So page is just:
Could be just
ObservableObject
.
This would be using UserControl as the pages.
you can just change Page to whatever page u want to display and it will swap.
if you look at the WinUI3 Gallery for example you can have a good idea of how the pages,menu etc work https://apps.microsoft.com/detail/9p3jfpwwdzrc?hl=en-US&gl=USlol just saw this
Hello friends
I am stuck on a small issue which I did check everything but missing something.
and last

But this still won't bind
but the DC looks fine, what did I miss?
disgard
It had to be ShowHashGeneratorCommand
Forgot thats how MVVM is XD