PropertyTabChangedEventArgs クラス

定義

PropertyTabChangedPropertyGrid イベントのデータを提供します。

public ref class PropertyTabChangedEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public class PropertyTabChangedEventArgs : EventArgs
public class PropertyTabChangedEventArgs : EventArgs
[<System.Runtime.InteropServices.ComVisible(true)>]
type PropertyTabChangedEventArgs = class
    inherit EventArgs
type PropertyTabChangedEventArgs = class
    inherit EventArgs
Public Class PropertyTabChangedEventArgs
Inherits EventArgs
継承
PropertyTabChangedEventArgs
属性

次のコード例では、この型の使用方法を示します。 この例では、イベント ハンドラーはイベントの発生を PropertyTabChanged 報告します。 このレポートは、イベントがいつ発生するかを学習するのに役立ち、デバッグに役立ちます。 複数のイベント、または頻繁に発生するイベントに関するレポートを作成するには、メッセージを複数行TextBoxに置き換えるかShowConsole.WriteLine追加することを検討してください。

コード例を実行するには、名前付きのPropertyGrid1PropertyGridのインスタンスを含むプロジェクトに貼り付けます。 次に、イベント ハンドラーがイベントに関連付けられていることを確認します PropertyTabChanged

private void PropertyGrid1_PropertyTabChanged(Object sender, PropertyTabChangedEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "OldTab", e.OldTab );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "NewTab", e.NewTab );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "PropertyTabChanged Event" );
}
Private Sub PropertyGrid1_PropertyTabChanged(sender as Object, e as PropertyTabChangedEventArgs) _ 
     Handles PropertyGrid1.PropertyTabChanged

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "OldTab", e.OldTab)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "NewTab", e.NewTab)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"PropertyTabChanged Event")

End Sub

注釈

このイベントは PropertyTabChanged 、ユーザーが新しいプロパティ タブを選択したときに発生します PropertyGrid

A PropertyTabChangedEventArgs は、選択されている古いタブと新しいタブにデータを提供します。

イベントの処理の詳細については、「処理とイベントの発生」を参照してください。

コンストラクター

PropertyTabChangedEventArgs(PropertyTab, PropertyTab)

PropertyTabChangedEventArgs クラスの新しいインスタンスを初期化します。

プロパティ

NewTab

選択されている新しい PropertyTab を取得します。

OldTab

以前選択されていた PropertyTab を取得します。

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象