public override int Compare(PropertyDescriptor x, PropertyDescriptor y)
        {
            GridPositionAttribute gpx = (GridPositionAttribute)x.Attributes[typeof(GridPositionAttribute)];
            GridPositionAttribute gpy = (GridPositionAttribute)y.Attributes[typeof(GridPositionAttribute)];

            return(gpx.Position.CompareTo(gpy.Position));
        }
        public int Compare(object x, object y)
        {
            GridPositionAttribute gpx = (GridPositionAttribute)((PropertyDescriptor)x).Attributes[typeof(GridPositionAttribute)];
            GridPositionAttribute gpy = (GridPositionAttribute)((PropertyDescriptor)y).Attributes[typeof(GridPositionAttribute)];

            return(gpx.Position.CompareTo(gpy.Position));
        }