PropertyValueUIItem 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
연결된 이벤트 처리기, 팝업 정보 문자열 및 속성에 대해 표시할 아이콘을 포함하여 속성 창 표시되는 속성에 대한 정보를 제공합니다.
public ref class PropertyValueUIItem
public class PropertyValueUIItem
type PropertyValueUIItem = class
Public Class PropertyValueUIItem
- 상속
-
PropertyValueUIItem
예제
다음 코드 예제에서는 이름 또는 PropertyValueUIItem 구성 요소의 모든 속성에 대 한 개체를 제공 HorizontalMargin 합니다VerticalMargin. 이러한 속성에 PropertyValueUIItem 대 한 이미지, 도구 설명 및 속성에 대 한 이미지를 클릭할 때 메시지 상자를 표시 하는 이벤트 처리기를 제공 합니다. 이 코드 예제는 인터페이스에 제공된 더 큰 예제의 IPropertyValueUIService 일부입니다.
// 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"));
}
}
생성자
| Name | Description |
|---|---|
| PropertyValueUIItem(Image, PropertyValueUIItemInvokeHandler, String) |
PropertyValueUIItem 클래스의 새 인스턴스를 초기화합니다. |
속성
| Name | Description |
|---|---|
| Image |
속성 창 그릴 8 x 8 픽셀 이미지를 가져옵니다. |
| InvokeHandler |
사용자가 이 항목을 두 번 클릭할 때 발생하는 처리기를 가져옵니다. |
| ToolTip |
이 항목에 대해 표시할 정보 문자열을 가져오거나 설정합니다. |
메서드
| Name | Description |
|---|---|
| Equals(Object) |
지정된 개체가 현재 개체와 같은지 여부를 확인합니다. (다음에서 상속됨 Object) |
| GetHashCode() |
기본 해시 함수로 사용됩니다. (다음에서 상속됨 Object) |
| GetType() |
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| MemberwiseClone() |
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| Reset() |
UI(사용자 인터페이스) 항목을 다시 설정합니다. |
| ToString() |
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |