TinyMvvm is a MvvmLibrary created by Daniel Hindrikes. Daniel has now updated it so it can be used with .NET MAUI. TinyMvvm: github.com/TinyStuff/TinyMvvm
Жүктеу.....
Пікірлер: 6
@jakubjenis7362 жыл бұрын
Since the Initialize method on TinyViewModel does not have any parameters, how would you go about passing data to the ViewModel? Let's say I need to pass some Id I need to do some load from a backend service.
@DanielHindrikes
2 жыл бұрын
You can just create you own method instead of using initialize.
@leblancthierry87812 жыл бұрын
Hi, thank you for this course. When I click the button "About" from the MainPage.xaml [video at 14:19] nothing is happening. I have the same code like [video at 14:04] in MainModel.cs public ICommand ShowAbout => new TinyCommand(() => { Navigation.NavigateTo( $"{nameof(AboutViewModel)}?id=1", "hello"); }); any idea ? another difference [video at 6:25] with the setter of Name property. set{ Set(ref name, value); } the "Set" is not recognize, but It works with "SetProperty" thanks,
@leblancthierry8781
2 жыл бұрын
test info: visual studio community 2022 17.3.0 Preview 4.0 Package: TinyMvvm.Maui (4.0.1-pre9) Microsoft.Maui.Dependencies 6.0.419 Microsoft.Maui.Extensions 6.0.419
@DanielHindrikes
2 жыл бұрын
I did change the Set method to SetProperty because I now have a Dependency on mvvm toolkit. It would conflict with it if you want to use it if I don't added it. I will take a look why it is not working.
Пікірлер: 6
Since the Initialize method on TinyViewModel does not have any parameters, how would you go about passing data to the ViewModel? Let's say I need to pass some Id I need to do some load from a backend service.
@DanielHindrikes
2 жыл бұрын
You can just create you own method instead of using initialize.
Hi, thank you for this course. When I click the button "About" from the MainPage.xaml [video at 14:19] nothing is happening. I have the same code like [video at 14:04] in MainModel.cs public ICommand ShowAbout => new TinyCommand(() => { Navigation.NavigateTo( $"{nameof(AboutViewModel)}?id=1", "hello"); }); any idea ? another difference [video at 6:25] with the setter of Name property. set{ Set(ref name, value); } the "Set" is not recognize, but It works with "SetProperty" thanks,
@leblancthierry8781
2 жыл бұрын
test info: visual studio community 2022 17.3.0 Preview 4.0 Package: TinyMvvm.Maui (4.0.1-pre9) Microsoft.Maui.Dependencies 6.0.419 Microsoft.Maui.Extensions 6.0.419
@DanielHindrikes
2 жыл бұрын
I did change the Set method to SetProperty because I now have a Dependency on mvvm toolkit. It would conflict with it if you want to use it if I don't added it. I will take a look why it is not working.