PropertyValueUIHandler 대리자

정의

의 구현 IPropertyValueUIService에 대리자를 추가하는 메서드를 나타냅니다.

public delegate void PropertyValueUIHandler(ITypeDescriptorContext ^ context, PropertyDescriptor ^ propDesc, ArrayList ^ valueUIItemList);
public delegate void PropertyValueUIHandler(ITypeDescriptorContext context, PropertyDescriptor propDesc, ArrayList valueUIItemList);
type PropertyValueUIHandler = delegate of ITypeDescriptorContext * PropertyDescriptor * ArrayList -> unit
Public Delegate Sub PropertyValueUIHandler(context As ITypeDescriptorContext, propDesc As PropertyDescriptor, valueUIItemList As ArrayList)

매개 변수

context
ITypeDescriptorContext

ITypeDescriptorContext 컨텍스트 정보를 가져오는 데 사용할 수 있는 항목입니다.

propDesc
PropertyDescriptor

쿼리되는 속성을 나타내는 A PropertyDescriptor 입니다.

valueUIItemList
ArrayList

ArrayList PropertyValueUIItem 속성과 연결된 UI 항목을 포함하는 개체입니다.

예제

다음 코드 예제에서는 명명 또는 속성에 대 한 PropertyValueUIHandler 개체를 제공 PropertyValueUIItem 하는 이벤트 처리기 메서드를 만드는 방법을 보여 줍니다.HorizontalMarginVerticalMargin

// PropertyValueUIHandler delegate that provides PropertyValueUIItem
// objects to any properties named HorizontalMargin or VerticalMargin.
private void marginPropertyValueUIHandler(
    System.ComponentModel.ITypeDescriptorContext context,
    System.ComponentModel.PropertyDescriptor propDesc,
    ArrayList itemList)
{
    // A PropertyValueUIHandler added to the IPropertyValueUIService
    // is queried once for each property of a component and passed
    // a PropertyDescriptor that represents the characteristics of 
    // the property when the Properties window is set to a new 
    // component. A PropertyValueUIHandler can determine whether 
    // to add a PropertyValueUIItem for the object to its ValueUIItem 
    // list depending on the values of the PropertyDescriptor.
    if (propDesc.DisplayName.Equals("HorizontalMargin"))
    {
        Image img = Image.FromFile("SampImag.jpg");
        itemList.Add(new PropertyValueUIItem(img, new PropertyValueUIItemInvokeHandler(this.marginInvoke), "Test ToolTip"));
    }
    if (propDesc.DisplayName.Equals("VerticalMargin"))
    {
        Image img = Image.FromFile("SampImag.jpg");
        img.RotateFlip(RotateFlipType.Rotate90FlipNone);
        itemList.Add(new PropertyValueUIItem(img, new PropertyValueUIItemInvokeHandler(this.marginInvoke), "Test ToolTip"));
    }
}

설명

이 대리자를 호출하면 지정된 속성에 대한 포함된 UI 항목을 매개 변수로 PropertyValueUIItem 전달된 속성 ArrayList 에 추가할 valueUIItemList 수 있습니다.

확장명 메서드

Name Description
GetMethodInfo(Delegate)

지정된 대리자가 나타내는 메서드를 나타내는 개체를 가져옵니다.

적용 대상

추가 정보