Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

asizikov/Curacao.Mvvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

Curacao.Mvvm

NuGet version

Build status

Yet another simple MVVM library for Windows Phone.

Was started as an experiment back in time when there was only one way to perform navigation in WP:

NavigationService.Navigate(new Uri("/SecondPage.xaml", UriKind.Relative));

Obviously this is horrible: it's all string based, no types and compile time checks. We also had to manually construct query string.

Nowadays things has changed and we can navigate to strongly typed Page:

Frame.Navigate(typeof(SecondPage), param);

Much better now, isn't it?

  • Compile time checks
  • Parameters as objects, not as strings

Still feels not very clean for me. Typically navigation is initialized from ViewMovel, so you have to bring the knowlege about UI into your VM.

This library is an attempt to invert this dependency.

You can annotate your view with [DependsOnViewModel] attribute, so that NavigationService can discover and bind all Views to ViewModels.

NavigationService.NavigateTo<Page1ViewModel, Data>(new Data{Id = 1, Value = "value"});

That gives you better separation. View models can 'live' in separate assembly and have no references to views at all.

About

MVVM library for Windows Phone 8

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages