Shock
Shock
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
So when I swithc VM, it's dropping the MainViewModel as expected but I just set it up on the other 2 and it'll carry
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
I set up the DI on the MainViewModel, but not the subsequent Away/Home view models
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
Ahh yes that's my problem thank you!
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
I will jump immediately to AwayViewModel and see if it nulls but I think it should work
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
But it makes sense since I don't have that setup
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
So the MainViewModel files above are actually AwayViewModel in my actual program
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
But I don't have the DI setup on the first ViewModel I change to so I think it's nulling out since that ViewModel isn't setup with DI but the other one is
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
I shortened the example for the 2000/4000 character limit, but in actuality the proceed button goes to HomeView MOdel which I then select the next ViewModel which we can call AwayViewModel
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
I think I just figured it out
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
When I breakpoint NavigateHomeCommand, customWrapper shows Namespace.Services.CustomWrapper so it's set then
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
Let me see if it returns null before I change ViewModels
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
Well that's weird - it is null
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
The DI was working as expected (allowing me to change view/viewmodels with the Navigate commands) before I tried to add Logic.CS into the mix
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
let me edit that in from what it really looks like
21 replies
CC#
Created by Shock on 11/21/2024 in #help
Dependency Injection returning null value
I skipped adding that since I was copying this from a computer without discord access
21 replies
CC#
Created by Shock on 11/13/2024 in #help
WPF local: when using Dependency Injection
I see. So de-coupling the data selection from MainWindow will ensure I can safely do that then?
14 replies
CC#
Created by Shock on 11/13/2024 in #help
WPF local: when using Dependency Injection
Although I don't plan on having to greatly expand the project once it's complete
14 replies
CC#
Created by Shock on 11/13/2024 in #help
WPF local: when using Dependency Injection
Although from what I'm seeing here - while it violates MVVM - I would be able to have my features work if I just didn't use bindings and violated that architecture
14 replies
CC#
Created by Shock on 11/13/2024 in #help
WPF local: when using Dependency Injection
That's where I ended up as well. It's probably not "needed" but because of the UI customization that WPF allows I wanted to dive into that instead of Winforms - however it seems like winforms would have probably been the better choice here
14 replies
CC#
Created by Shock on 11/13/2024 in #help
WPF local: when using Dependency Injection
In my earlier attempts before reseraching MVVM I was taking the result of the Radio Button selection and parsing the string in order to set a variable, but it appears Data Binding is the best practice for that
14 replies