PropertyGridObject.ICustomTypeDescriptor.GetProperties メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
プロパティ グリッドのプロパティを返します。
オーバーロード
ICustomTypeDescriptor.GetProperties() |
プロパティ グリッドのプロパティを返します。 |
ICustomTypeDescriptor.GetProperties(Attribute[]) |
指定した属性配列をフィルターとして使用して、プロパティ グリッドのプロパティを返します。 |
ICustomTypeDescriptor.GetProperties()
プロパティ グリッドのプロパティを返します。
virtual System::ComponentModel::PropertyDescriptorCollection ^ System.ComponentModel.ICustomTypeDescriptor.GetProperties() = System::ComponentModel::ICustomTypeDescriptor::GetProperties;
System.ComponentModel.PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties ();
Function GetProperties () As PropertyDescriptorCollection Implements ICustomTypeDescriptor.GetProperties
戻り値
PropertyDescriptorCollectionプロパティ グリッドのプロパティを表す オブジェクト。
実装
例
次の例では、 オーバーロードを <xref:Microsoft.Web.Management.Client.PropertyGridObject.System.ComponentModel.ICustomTypeDescriptor.GetProperties> 複製します。
private PropertyDescriptorCollection MyGetPropertiesImpl(
Attribute[] attributes) {
PropertyDescriptorCollection props =
GetProperties(attributes);
if (ReadOnly) {
Type thisType = GetType();
ArrayList readOnlyProperties = new ArrayList();
foreach (PropertyDescriptor prop in props) {
readOnlyProperties.Add(
TypeDescriptor.CreateProperty(
thisType, prop,
new ReadOnlyAttribute(true))
);
}
props = new PropertyDescriptorCollection(
(PropertyDescriptor[])readOnlyProperties.ToArray(
typeof(PropertyDescriptor))
);
}
return props;
}
適用対象
ICustomTypeDescriptor.GetProperties(Attribute[])
指定した属性配列をフィルターとして使用して、プロパティ グリッドのプロパティを返します。
virtual System::ComponentModel::PropertyDescriptorCollection ^ System.ComponentModel.ICustomTypeDescriptor.GetProperties(cli::array <Attribute ^> ^ attributes) = System::ComponentModel::ICustomTypeDescriptor::GetProperties;
System.ComponentModel.PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties (Attribute[] attributes);
Function GetProperties (attributes As Attribute()) As PropertyDescriptorCollection Implements ICustomTypeDescriptor.GetProperties
パラメーター
戻り値
特定の属性セット Attribute に一致するプロパティ グリッドのプロパティを表す オブジェクトの配列。
実装
例
次の例では、 オーバーロードを <xref:Microsoft.Web.Management.Client.PropertyGridObject.System.ComponentModel.ICustomTypeDescriptor.GetProperties%28System.Attribute%5B%5D%29> 複製します。
private PropertyDescriptorCollection MyGetPropertiesImpl(
Attribute[] attributes) {
PropertyDescriptorCollection props =
GetProperties(attributes);
if (ReadOnly) {
Type thisType = GetType();
ArrayList readOnlyProperties = new ArrayList();
foreach (PropertyDescriptor prop in props) {
readOnlyProperties.Add(
TypeDescriptor.CreateProperty(
thisType, prop,
new ReadOnlyAttribute(true))
);
}
props = new PropertyDescriptorCollection(
(PropertyDescriptor[])readOnlyProperties.ToArray(
typeof(PropertyDescriptor))
);
}
return props;
}