Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ksemenenko/mvvmbase
MVVM helper
https://github.com/ksemenenko/mvvmbase
mvvm wpf xamarin-forms
Last synced: about 2 months ago
JSON representation
MVVM helper
- Host: GitHub
- URL: https://github.com/ksemenenko/mvvmbase
- Owner: KSemenenko
- License: mit
- Created: 2015-04-18T19:29:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-26T15:33:10.000Z (almost 7 years ago)
- Last Synced: 2024-11-08T15:06:43.891Z (about 2 months ago)
- Topics: mvvm, wpf, xamarin-forms
- Language: C#
- Homepage:
- Size: 2.71 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MVVMBase Mini Framework
This is a small library that uses pattern MVVM for a handy use in WPF and Xamarin forms.
## Available at NuGet.
https://www.nuget.org/packages/ksemenenko.MVVMBase/### Build status
[![Build status](https://ci.appveyor.com/api/projects/status/5lckjbd45no96f4c?svg=true)](https://ci.appveyor.com/project/KSemenenko/mvvmbase)
[![Build status](https://ci.appveyor.com/api/projects/status/5lckjbd45no96f4c/branch/master?svg=true)](https://ci.appveyor.com/project/KSemenenko/mvvmbase/branch/master)## Example use:
```cs
public class ModelClass : NotifyObject
{public ModelClass()
{
// bind to property
BindToPropertyChange(nameof(MyProperty), nameof(MyCommand));
BindToPropertyChange(() => MyCommand, nameof(MyPropertyByName));//or
Bind(nameof(MyProperty)).To(nameof(MyCommand));
Bind(() => MyCommand).To(()=> MyPropertyByName);}
private string myProperty;
public string MyProperty
{
get { return myProperty; }
set
{
myProperty = value;
OnPropertyChanged(() => MyProperty);
}
}
private string myPropertyByName;
public string MyPropertyByName
{
get { return myPropertyByName; }
set
{
myPropertyByName = value;
OnPropertyChanged(nameof(MyPropertyByName));
}
}
private string myPropertyAutoChange;
public string MyPropertyAutoChange
{
get { return myPropertyAutoChange; }
set
{
SetProperty(ref myPropertyAutoChange, value);
}
}
private string myPropertyByMemberName;
public string MyPropertyByMemberName
{
get { return myPropertyByMemberName; }
set
{
myPropertyByMemberName = value;
OnPropertyChanged();
}
}public MvvmCommand MyCommand
{
get
{
return new MvvmCommand(executedParam =>
{
// Do something
},
canExecutedParam => { return true; });
}
}
}
```|Platform|Supported|Version|
| ------------------- | :-----------: | :------------------: |
|.NET|Yes|3.5+|
|Xamarin.iOS|Yes|iOS 6+|
|Xamarin.iOS Unified|Yes|iOS 6+|
|Xamarin.Android|Yes|API 10+|
|Windows Phone 8|Partial|8.0+|
|Windows Phone 8.1|Partial|8.1+|
|Windows Store|Partial|8.1+|
|Windows 10 UWP|Yes|10+|