PropertyValueUIHandler デリゲートとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > PropertyValueUIHandler デリゲートの意味・解説 

PropertyValueUIHandler デリゲート

IPropertyValueUIService の実装にデリゲートを追加するメソッドを表します。

名前空間: System.Drawing.Design
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Delegate Sub PropertyValueUIHandler
 ( _
    context As ITypeDescriptorContext, _
    propDesc As PropertyDescriptor, _
    valueUIItemList As ArrayList _
)
Dim instance As New PropertyValueUIHandler(AddressOf
 HandlerMethod)
public delegate void PropertyValueUIHandler
 (
    ITypeDescriptorContext context,
    PropertyDescriptor propDesc,
    ArrayList valueUIItemList
)
public delegate void PropertyValueUIHandler
 (
    ITypeDescriptorContext^ context, 
    PropertyDescriptor^ propDesc, 
    ArrayList^ valueUIItemList
)
/** @delegate */
public delegate void PropertyValueUIHandler
 (
    ITypeDescriptorContext context, 
    PropertyDescriptor propDesc, 
    ArrayList valueUIItemList
)
JScript では、デリゲートは使用できますが、新規に宣言することはできません。

パラメータ

context

コンテキスト情報を取得するために使用できる ITypeDescriptorContext。

propDesc

クエリの対象となるプロパティを表す PropertyDescriptor。

valueUIItemList

プロパティに関連付けられている UI 項目を格納している PropertyValueUIItem オブジェクトの ArrayList。

解説解説

このデリゲートが呼び出されると、指定されたプロパティに対する UI 項目を含む PropertyValueUIItem を、valueUIItemList パラメータとして渡された ArrayList に追加します。

使用例使用例

次に示すのは、HorizontalMargin または VerticalMargin という名前のすべてのプロパティに対して PropertyValueUIItem オブジェクトを提供する PropertyValueUIHandler イベント ハンドラ メソッドを作成するコード例です。

' PropertyValueUIHandler delegate that provides PropertyValueUIItem
' objects to any properties named HorizontalMargin or VerticalMargin.
Private Sub marginPropertyValueUIHandler(ByVal
 context As System.ComponentModel.ITypeDescriptorContext, ByVal
 propDesc As System.ComponentModel.PropertyDescriptor, ByVal itemList As ArrayList)
    ' 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")
 Then
        Dim img As Image = DeserializeFromBase64Text(imageBlob1)
        itemList.Add(New PropertyValueUIItem(img, New
 PropertyValueUIItemInvokeHandler(AddressOf Me.marginInvoke),
 "Test ToolTip"))
    End If
    If propDesc.DisplayName.Equals("VerticalMargin")
 Then
        Dim img As Image = DeserializeFromBase64Text(imageBlob1)
        img.RotateFlip(RotateFlipType.Rotate90FlipNone)
        itemList.Add(New PropertyValueUIItem(img, New
 PropertyValueUIItemInvokeHandler(AddressOf Me.marginInvoke),
 "Test ToolTip"))
    End If
End Sub
// 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 = DeserializeFromBase64Text(imageBlob1);
        itemList.Add( new PropertyValueUIItem( img, new
 PropertyValueUIItemInvokeHandler(this.marginInvoke), "Test
 ToolTip") );
    }
    if( propDesc.DisplayName.Equals( "VerticalMargin"
 ) )
    {
        Image img = DeserializeFromBase64Text(imageBlob1);
        img.RotateFlip(RotateFlipType.Rotate90FlipNone);
        itemList.Add( new PropertyValueUIItem( img, new
 PropertyValueUIItemInvokeHandler(this.marginInvoke), "Test
 ToolTip") );
    }
}
// PropertyValueUIHandler delegate that provides PropertyValueUIItem
// objects to any properties named horizontalMargin or verticalMargin.
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 = DeserializeFromBase64Text( imageBlob1 );
      itemList->Add( gcnew PropertyValueUIItem( img,gcnew PropertyValueUIItemInvokeHandler(
 this, &PropertyUIComponent::marginInvoke ),"Test ToolTip"
 ) );
   }

   if ( propDesc->DisplayName->Equals( "verticalMargin"
 ) )
   {
      Image^ img = DeserializeFromBase64Text( imageBlob1 );
      img->RotateFlip( RotateFlipType::Rotate90FlipNone );
      itemList->Add( gcnew PropertyValueUIItem( img,gcnew PropertyValueUIItemInvokeHandler(
 this, &PropertyUIComponent::marginInvoke ),"Test ToolTip"
 ) );
   }
}
// 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.get_DisplayName().Equals("HorizontalMargin"))
 {
        Image img = DeserializeFromBase64Text(imageBlob1);

        itemList.Add(new PropertyValueUIItem(img, 
            new PropertyValueUIItemInvokeHandler(this.MarginInvoke)
,
            "Test ToolTip"));
    }
    if (propDesc.get_DisplayName().Equals("VerticalMargin"))
 {
        Image img = DeserializeFromBase64Text(imageBlob1);

        img.RotateFlip(RotateFlipType.Rotate90FlipNone);
        itemList.Add(new PropertyValueUIItem(img, 
            new PropertyValueUIItemInvokeHandler(this.MarginInvoke)
,
            "Test ToolTip"));
    }
} //MarginPropertyValueUIHandler
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
System.Drawing.Design 名前空間
IPropertyValueUIService インターフェイス
PropertyValueUIItem



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「PropertyValueUIHandler デリゲート」の関連用語

PropertyValueUIHandler デリゲートのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



PropertyValueUIHandler デリゲートのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS