You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System;
- using System.Windows.Controls;
-
- namespace BPA.UIControl.DataAnnotations
- {
- /// <summary>
- /// DataGrid 列宽
- /// </summary>
- [AttributeUsage(AttributeTargets.Property)]
- public class ColumnWidthAttribute : Attribute
- {
- /// <summary>
- /// 列宽
- /// </summary>
- public DataGridLength Width { get; }
-
- /// <summary>
- /// DataGrid 列宽
- /// </summary>
- /// <param name="width">列宽</param>
- public ColumnWidthAttribute(string width)
- {
- var converter = new DataGridLengthConverter();
- Width = (DataGridLength)converter.ConvertFromString(width);
- }
- }
- }
|