RecommendedAsConfigurableAttribute.RecommendedAsConfigurable RecommendedAsConfigurableAttribute.RecommendedAsConfigurable RecommendedAsConfigurableAttribute.RecommendedAsConfigurable RecommendedAsConfigurableAttribute.RecommendedAsConfigurable Property

정의

이 특성이 바인딩되는 속성을 애플리케이션 설정으로 사용할 수 있는지 여부를 나타내는 값을 가져옵니다.Gets a value indicating whether the property this attribute is bound to can be used as an application setting.

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

속성 값

이 특성이 바인딩되는 속성을 애플리케이션 설정으로 사용할 수 있으면 true이고, 그렇지 않으면 false입니다.true if the property this attribute is bound to can be used as an application setting; otherwise, false.

예제

다음 예제에서는 확인 하는지 여부를 MyProperty 를 바인딩할 수 있습니다.The following example checks to see whether MyProperty is bindable. 먼저 코드에 대 한 특성을 가져옵니다 MyProperty 여:First the code gets the attributes for MyProperty by:

코드 설정 하 여 myAttribute 의 값에는 RecommendedAsConfigurableAttributeAttributeCollection 속성 바인딩 가능한 지 여부를 확인 합니다.Then the code sets myAttribute to the value of the RecommendedAsConfigurableAttribute in the AttributeCollection and checks whether the property is bindable.

// 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

적용 대상

추가 정보