Files
GazpromApp/ViewModels/Basic/PropertyViewModel.cs
T
2025-07-04 15:29:23 +03:00

28 lines
628 B
C#

using System.Collections.ObjectModel;
using CommunityToolkit.Mvvm.ComponentModel;
using GazpromApp.Models;
namespace GazpromApp.ViewModels;
public partial class PropertyViewModel : ViewModelBase
{
[ObservableProperty]
private string _name;
[ObservableProperty]
private string _value;
public ObservableCollection<PropertyViewModel> Properties { get; set; } = [];
public PropertyViewModel()
{
Name = string.Empty;
Value = string.Empty;
}
public PropertyViewModel(Property property)
{
Name = property.Name;
Value = property.Value;
}
}