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.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace WPFDemo.Bb
- {
- [AttributeUsage(AttributeTargets.Property)]
- public class DataGridColumnOrderAttribute : Attribute
- {
- public static readonly DataGridColumnOrderAttribute Default = new DataGridColumnOrderAttribute(0);
-
- public DataGridColumnOrderAttribute(int order)
- {
- DataGridColumnOrderValue = order;
- }
-
- public virtual int DataGridColumnOrder => DataGridColumnOrderValue;
-
- protected int DataGridColumnOrderValue { get; set; }
-
- public override bool Equals(object obj)
- {
- if (obj == this)
- {
- return true;
- }
-
- return obj is DataGridColumnOrderAttribute other && other.DataGridColumnOrder == DataGridColumnOrder;
- }
-
- public override int GetHashCode()
- {
- return DataGridColumnOrder.GetHashCode();
- }
-
- public override bool IsDefaultAttribute()
- {
- return Equals(Default);
- }
- }
- }
|