Student handleiding added
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -8,8 +10,35 @@ namespace MVVM_DEMO.Models
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
public string ProductName { get; set; }
|
||||
public double Price { get; set; }
|
||||
private string _productName;
|
||||
private decimal _productPrice;
|
||||
|
||||
public string ProductName
|
||||
{
|
||||
get => _productName;
|
||||
set
|
||||
{
|
||||
_productName = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public decimal ProductPrice
|
||||
{
|
||||
get => _productPrice;
|
||||
set
|
||||
{
|
||||
_productPrice = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user