System.ComponentModel.TypeDescriptor.GetDefaultProperty C# (CSharp) Method

GetDefaultProperty() public static method

Gets the default property for the specified type of component.
public static GetDefaultProperty ( Type componentType ) : PropertyDescriptor
componentType System.Type
return PropertyDescriptor
        public static PropertyDescriptor GetDefaultProperty(Type componentType)
        {
            if (componentType == null)
            {
                Debug.Fail("COMPAT:  Returning an empty collection, but you should not pass null here");
                return null;
            }

            return GetDescriptor(componentType, "componentType").GetDefaultProperty();
        }

Same methods

TypeDescriptor::GetDefaultProperty ( object component ) : PropertyDescriptor
TypeDescriptor::GetDefaultProperty ( object component, bool noCustomTypeDesc ) : PropertyDescriptor

Usage Example

Example #1
0
 public PropertyDescriptor GetDefaultProperty() => NativeTypeDesc.GetDefaultProperty(_entityType, true);