RecommendedAsConfigurableAttribute.RecommendedAsConfigurable 속성

정의

이 특성이 바인딩되는 속성을 애플리케이션 설정으로 사용할 수 있는지 여부를 나타내는 값을 가져옵니다.

public:
 property bool RecommendedAsConfigurable { bool get(); };
public bool RecommendedAsConfigurable { get; }
member this.RecommendedAsConfigurable : bool
Public ReadOnly Property RecommendedAsConfigurable As Boolean

속성 값

이 특성이 바인딩되는 속성을 애플리케이션 설정으로 사용할 수 있으면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에서는 가 바인딩 가능한지 여부를 MyProperty 확인합니다. 먼저 코드에 대 한 특성을 가져옵니다 MyProperty 여:

그런 다음 코드는 의 값을 RecommendedAsConfigurableAttributeAttributeCollection 로 설정하고 myAttribute 속성을 바인딩할 수 있는지 여부를 확인합니다.

// Gets the attributes for the property.
AttributeCollection^ attributes = TypeDescriptor::GetProperties( this )[ "MyProperty" ]->Attributes;

// Checks to see if the property is recommended as configurable.
RecommendedAsConfigurableAttribute^ myAttribute = dynamic_cast<RecommendedAsConfigurableAttribute^>(attributes[ RecommendedAsConfigurableAttribute::typeid ]);
if ( myAttribute->RecommendedAsConfigurable )
{
   // Insert code here.
}
// Gets the attributes for the property.
AttributeCollection attributes = 
   TypeDescriptor.GetProperties(this)["MyProperty"].Attributes;

// Checks to see if the property is recommended as configurable.
RecommendedAsConfigurableAttribute myAttribute = 
   (RecommendedAsConfigurableAttribute)attributes[typeof(RecommendedAsConfigurableAttribute)];
if(myAttribute.RecommendedAsConfigurable) {
   // Insert code here.
}
' Gets the attributes for the property.
Dim attributes As AttributeCollection = _
   TypeDescriptor.GetProperties(Me)("MyProperty").Attributes
       
' Checks to see if the property is recommended as configurable.
Dim myAttribute As RecommendedAsConfigurableAttribute = _
   CType(attributes(GetType(RecommendedAsConfigurableAttribute)), _
   RecommendedAsConfigurableAttribute)
   
If myAttribute.RecommendedAsConfigurable Then
    ' Insert code here.
End If

적용 대상

추가 정보