Inheritance: Gu.Wpf.DataGrid2D.IndexPropertyDescriptor
コード例 #1
0
        private static PropertyDescriptorCollection CreateColumnPropertyDescriptorCollection(Array source)
        {
            var elementType = source.GetType().GetElementType();
            var n = source.GetLength(0);
            var descriptors = new Array2DIndexPropertyDescriptor[n];
            for (int i = 0; i < n; i++)
            {
                descriptors[i] = new Array2DIndexPropertyDescriptor(elementType, i);
            }

            return new PropertyDescriptorCollection(descriptors);
        }
コード例 #2
0
        private static PropertyDescriptorCollection CreateRowPropertyDescriptorCollection(Array source)
        {
            var elementType = source.GetType().GetElementType();
            var n = source.GetLength(1);
            var descriptors = new Array2DIndexPropertyDescriptor[n];
            for (int i = 0; i < n; i++)
            {
                descriptors[i] = new Array2DIndexPropertyDescriptor(elementType, i);
            }

            // ReSharper disable once CoVariantArrayConversion
            return new PropertyDescriptorCollection(descriptors);
        }
コード例 #3
0
        private static PropertyDescriptorCollection CreateColumnPropertyDescriptorCollection(Array source)
        {
            var elementType = source.GetType().GetElementType();
            var n           = source.GetLength(0);
            var descriptors = new Array2DIndexPropertyDescriptor[n];

            for (int i = 0; i < n; i++)
            {
                descriptors[i] = new Array2DIndexPropertyDescriptor(elementType, i);
            }

            return(new PropertyDescriptorCollection(descriptors));
        }
コード例 #4
0
        private static PropertyDescriptorCollection CreateRowPropertyDescriptorCollection(Array source)
        {
            var elementType = source.GetType().GetElementType();
            var n           = source.GetLength(1);
            var descriptors = new Array2DIndexPropertyDescriptor[n];

            for (int i = 0; i < n; i++)
            {
                descriptors[i] = new Array2DIndexPropertyDescriptor(elementType, i);
            }

            // ReSharper disable once CoVariantArrayConversion
            return(new PropertyDescriptorCollection(descriptors));
        }
コード例 #5
0
        internal static Array2DRowView CreateForColumn(Array2DView source, int columnIndex)
        {
            var propertyDescriptors = Array2DIndexPropertyDescriptor.GetColumnPropertyDescriptorCollection(source);

            return(new Array2DRowView(source, columnIndex, propertyDescriptors));
        }
コード例 #6
0
        internal static Array2DRowView CreateForRow(Array2DView source, int rowIndex)
        {
            var propertyDescriptors = Array2DIndexPropertyDescriptor.GetRowPropertyDescriptorCollection(source);

            return(new Array2DRowView(source, rowIndex, propertyDescriptors));
        }