Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ViewModel : INotifyPropertyChanged
- {
- private Model _model=new Model("BlaBlaBla");
- public string ModelName
- {
- get { return _model.ModelName; }
- set
- {
- _model.ModelName = value;
- OnPropertyChanged("ModelName");
- }
- }
- protected virtual void OnPropertyChanged(string propertyName)
- {
- var handler = PropertyChanged;
- if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
- }
- }
- class Model
- {
- public string ModelName { get; set; }
- public Model(string name){
- ModelName=name
- }
- }
- private Model _model = new Model("BlaBlaBla");
- public Model(string name)
- {
- ModelName=name
- }
Add Comment
Please, Sign In to add comment