51 lines
1.7 KiB
C#
51 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace Client.Application.Components
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for Item.xaml
|
|
/// </summary>
|
|
public partial class Item : Button
|
|
{
|
|
public static readonly DependencyProperty ImageSourceProperty =
|
|
DependencyProperty.Register("ImageSource", typeof(ImageSource), typeof(Item), new PropertyMetadata(default(ImageSource)));
|
|
public static readonly DependencyProperty ItemNameProperty =
|
|
DependencyProperty.Register("ItemName", typeof(string), typeof(Item), new PropertyMetadata("Item"));
|
|
public static readonly DependencyProperty DescriptionProperty =
|
|
DependencyProperty.Register("Description", typeof(string), typeof(Item), new PropertyMetadata(""));
|
|
|
|
public Item()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public ImageSource ImageSource
|
|
{
|
|
get { return (ImageSource)GetValue(ImageSourceProperty); }
|
|
set { SetValue(ImageSourceProperty, value); }
|
|
}
|
|
public string ItemName
|
|
{
|
|
get { return (string)GetValue(ItemNameProperty); }
|
|
set { SetValue(ItemNameProperty, value); }
|
|
}
|
|
public string? Description
|
|
{
|
|
get { return (string?)GetValue(DescriptionProperty); }
|
|
set { SetValue(DescriptionProperty, value); }
|
|
}
|
|
}
|
|
}
|