Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rio-based ViewModels #299

Closed
slodge opened this issue Jun 6, 2013 · 1 comment
Closed

Rio-based ViewModels #299

slodge opened this issue Jun 6, 2013 · 1 comment
Labels
t/feature Feature request type

Comments

@slodge
Copy link
Contributor

slodge commented Jun 6, 2013

INotifyPropertyChanged is lovely

But sometimes it feels like overkill.

I'd like to suggest adding an additional source binding interface - IRio - with a simple implementation Rio<T>

In a ViewModel this could be written as:

   public readonly IRio<string> FirstName = new Rio<string>("Initial value");

After this, then binding:

   local:mvxBind="Text FirstName"

would be updated whenever the viewModel calls:

   FirstName.Set("New value");

and anyone can get the value using

   FirstName.Get();

(we might also be able to support cast operations - not sure)

Collections could be implemented using a Rio accessor to an INotifyCollectionChanged object.

IRio fields could also be mixed and matched with INotifyPropertyChanged methods too.

The name Rio is possible open to change...

@slodge
Copy link
Contributor Author

slodge commented Jul 18, 2013

documented in video and N+1 sample now... as well as in wiki entry... so closing

@slodge slodge closed this as completed Jul 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/feature Feature request type
Development

No branches or pull requests

1 participant