IEventBindingService.ShowCode Method

Definition

Displays the user code for the designer.

Overloads

ShowCode()

Displays the user code for the designer.

ShowCode(Int32)

Displays the user code for the designer at the specified line.

ShowCode(IComponent, EventDescriptor)

Displays the user code for the specified event.

ShowCode()

Displays the user code for the designer.

C#
public bool ShowCode();

Returns

true if the code is displayed; otherwise, false.

Remarks

This method displays the code editor.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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

ShowCode(Int32)

Displays the user code for the designer at the specified line.

C#
public bool ShowCode(int lineNumber);

Parameters

lineNumber
Int32

The line number to place the caret on.

Returns

true if the code is displayed; otherwise, false.

Remarks

This method displays the code editor and positions the cursor on the specified line.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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

ShowCode(IComponent, EventDescriptor)

Displays the user code for the specified event.

C#
public bool ShowCode(System.ComponentModel.IComponent component, System.ComponentModel.EventDescriptor e);

Parameters

component
IComponent

The component that the event is connected to.

e
EventDescriptor

The event to display.

Returns

true if the code is displayed; otherwise, false.

Remarks

This method displays the code editor and positions the cursor on the line that the specified event is declared on.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.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