Student handleiding added

This commit is contained in:
Mark Kors
2025-12-15 11:10:12 +01:00
parent ce63f9bff9
commit e8c5322782
5 changed files with 1685 additions and 20 deletions

View File

@@ -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));
}
}
}