IComponentChangeService.OnComponentChanging(Object, MemberDescriptor) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Announces to the component change service that a particular component is changing.
public:
void OnComponentChanging(System::Object ^ component, System::ComponentModel::MemberDescriptor ^ member);
public void OnComponentChanging (object component, System.ComponentModel.MemberDescriptor member);
public void OnComponentChanging (object component, System.ComponentModel.MemberDescriptor? member);
abstract member OnComponentChanging : obj * System.ComponentModel.MemberDescriptor -> unit
Public Sub OnComponentChanging (component As Object, member As MemberDescriptor)
- component
- Object
The component that is about to change.
- member
- MemberDescriptor
The member that is changing. This is null
if this change is not related to a single member.
This method raises the ComponentChanging event.
Most designers included with the Windows SDK, as well as the Visual Studio design-time environment, typically raise this event automatically; so most of the time, you do not need to explicitly call this method. The appropriate IComponentChangeService events are automatically raised when a PropertyDescriptor is used to change a property value or components are added or removed from the IDesignerHost container.
This method throws an exception if the property cannot be changed. This is not intended to validate the values of a particular property. Instead, it is intended to provide a global method of preventing a component from changing. For example, if a designer file is checked into source code control, this event's handler would typically throw an exception if the user refused to check out the file.
Product | Versies |
---|---|
.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-feedback
.NET is een open source project. Selecteer een koppeling om feedback te geven: