Добавлен example

This commit is contained in:
2026-01-25 07:56:35 +03:00
parent a902474345
commit 33abd94f6e
20 changed files with 1052 additions and 1 deletions

View File

@@ -0,0 +1,72 @@
using System.ComponentModel;
namespace Lattice.Example.DragDrop;
public class DragDropItem : INotifyPropertyChanged
{
private string _name = string.Empty;
private string _description = string.Empty;
private string _icon = string.Empty;
private string _type = string.Empty;
public event PropertyChangedEventHandler? PropertyChanged;
public string Name
{
get => _name;
set
{
if (_name != value)
{
_name = value;
OnPropertyChanged(nameof(Name));
}
}
}
public string Description
{
get => _description;
set
{
if (_description != value)
{
_description = value;
OnPropertyChanged(nameof(Description));
}
}
}
public string Icon
{
get => _icon;
set
{
if (_icon != value)
{
_icon = value;
OnPropertyChanged(nameof(Icon));
}
}
}
public string Type
{
get => _type;
set
{
if (_type != value)
{
_type = value;
OnPropertyChanged(nameof(Type));
}
}
}
protected virtual void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public override string ToString() => $"{Name} ({Type})";
}