ComponentChangingEventArgs クラス
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ComponentChanging イベントのデータを提供します。 このクラスは継承できません。
public ref class ComponentChangingEventArgs sealed : EventArgs
public sealed class ComponentChangingEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ComponentChangingEventArgs : EventArgs
type ComponentChangingEventArgs = class
inherit EventArgs
[<System.Runtime.InteropServices.ComVisible(true)>]
type ComponentChangingEventArgs = class
inherit EventArgs
Public NotInheritable Class ComponentChangingEventArgs
Inherits EventArgs
- 継承
- 属性
次の例では、 を作成する方法を ComponentChangingEventArgs示します。
public:
// This example method creates a ComponentChangingEventArgs using the specified arguments.
// Typically, this type of event args is created by a design mode subsystem.
ComponentChangingEventArgs^ CreateComponentChangingEventArgs( Object^ component, MemberDescriptor^ member )
{
// The component that is about to change: args.Component
// The member that is about to change: args.Member
return gcnew ComponentChangingEventArgs( component,member );
}
// This example method creates a ComponentChangingEventArgs using the specified arguments.
// Typically, this type of event args is created by a design mode subsystem.
public ComponentChangingEventArgs CreateComponentChangingEventArgs(object component, MemberDescriptor member)
{
ComponentChangingEventArgs args = new ComponentChangingEventArgs(component, member);
// The component that is about to change: args.Component
// The member that is about to change: args.Member
return args;
}
' This example method creates a ComponentChangingEventArgs using the specified arguments.
' Typically, this type of event args is created by a design mode subsystem.
Public Function CreateComponentChangingEventArgs(ByVal component As Object, ByVal member As MemberDescriptor) As ComponentChangingEventArgs
Dim args As New ComponentChangingEventArgs(component, member)
' The component that is about to change: args.Component
' The member that is about to change: args.Member
Return args
End Function
ComponentChangingEventArgs は、イベントに関するデータを ComponentChanging 提供します。 イベントは ComponentChanging 、現在のデザイン ドキュメント内の IComponentChangeService 特定のコンポーネントが変更されようとしていることを、 および登録済みのイベント ハンドラーに通知します。 このイベントは、コンポーネントの変更を防ぐために、広くアクセス可能なメソッドを提供します。
ComponentChangingコンポーネントが変更される前にイベントが発生します。 このイベントは、デザイナーが変更を中止する機会を提供します。 コンポーネント デザイナーは通常、イベントを自動的に ComponentChanging 発生させます。 プロパティを変更できない場合、イベントを処理するメソッドは例外をスローできます。 たとえば、デザイナー ファイルがソース コード管理にチェックインされている場合、通常、ユーザーがファイルのチェックを拒否した場合、このイベントのハンドラーは例外をスローします。
は ComponentChangingEventArgs 、次の情報を提供します。
Component
変更されるコンポーネントを示す プロパティ。Member
変更される予定のメンバーを示す プロパティ。
このクラスが別のクラスの基底クラスとして指定されている場合、コンパイラ エラーが発生します。
Component |
ComponentChangingEventArgs クラスの新しいインスタンスを初期化します。 |
Component |
変更されようとしているコンポーネント、または変更されようとしているメンバーの親コンテナーであるコンポーネントを取得します。 |
Member |
変更されようとしているメンバーを取得します。 |
Equals(Object) |
指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
Get |
既定のハッシュ関数として機能します。 (継承元 Object) |
Get |
現在のインスタンスの Type を取得します。 (継承元 Object) |
Memberwise |
現在の Object の簡易コピーを作成します。 (継承元 Object) |
To |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |
製品 | バージョン |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。