36 lines
959 B
C#
36 lines
959 B
C#
using System;
|
|
|
|
namespace CommonTools.Attributes
|
|
{
|
|
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
|
|
public class ViewModelPropertyAttribute : Attribute
|
|
{
|
|
/// <summary>
|
|
/// Название на форме
|
|
/// </summary>
|
|
public string DisplayName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Скрывать или нет
|
|
/// </summary>
|
|
public bool IsHide { get; set; }
|
|
|
|
/// <summary>
|
|
/// Ширина колонки
|
|
/// </summary>
|
|
public int ColumnWidth { get; set; }
|
|
|
|
/// <summary>
|
|
/// Конструктор
|
|
/// </summary>
|
|
/// <param name="displayName">Название на форме</param>
|
|
/// <param name="isHide">Скрывать или нет</param>
|
|
/// <param name="columnWidth">Ширина колонки</param>
|
|
public ViewModelPropertyAttribute(string displayName, int columnWidth, bool isHide = false)
|
|
{
|
|
DisplayName = displayName;
|
|
ColumnWidth = columnWidth;
|
|
IsHide = isHide;
|
|
}
|
|
}
|
|
} |