-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
WebBrowserNavigatingEventHandler.xml
61 lines (55 loc) · 4.58 KB
/
WebBrowserNavigatingEventHandler.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<Type Name="WebBrowserNavigatingEventHandler" FullName="System.Windows.Forms.WebBrowserNavigatingEventHandler">
<TypeSignature Language="C#" Value="public delegate void WebBrowserNavigatingEventHandler(object sender, WebBrowserNavigatingEventArgs e);" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;windowsdesktop-3.0;windowsdesktop-3.1;windowsdesktop-5.0" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed WebBrowserNavigatingEventHandler extends System.MulticastDelegate" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.WebBrowserNavigatingEventHandler" />
<TypeSignature Language="VB.NET" Value="Public Delegate Sub WebBrowserNavigatingEventHandler(sender As Object, e As WebBrowserNavigatingEventArgs)" />
<TypeSignature Language="F#" Value="type WebBrowserNavigatingEventHandler = delegate of obj * WebBrowserNavigatingEventArgs -> unit" />
<TypeSignature Language="C++ CLI" Value="public delegate void WebBrowserNavigatingEventHandler(System::Object ^ sender, WebBrowserNavigatingEventArgs ^ e);" />
<TypeSignature Language="C#" Value="public delegate void WebBrowserNavigatingEventHandler(object? sender, WebBrowserNavigatingEventArgs e);" FrameworkAlternate="windowsdesktop-6.0;windowsdesktop-7.0;windowsdesktop-8.0;windowsdesktop-9.0" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>
</Base>
<Parameters>
<Parameter Name="sender" Type="System.Object">
<Attributes>
<Attribute FrameworkAlternate="windowsdesktop-8.0;windowsdesktop-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
<Parameter Name="e" Type="System.Windows.Forms.WebBrowserNavigatingEventArgs" />
</Parameters>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Docs>
<param name="sender">The source of the event.</param>
<param name="e">A <see cref="T:System.Windows.Forms.WebBrowserNavigatingEventArgs" /> that contains the event data.</param>
<summary>Represents the method that will handle the <see cref="E:System.Windows.Forms.WebBrowser.Navigating" /> event of a <see cref="T:System.Windows.Forms.WebBrowser" /> control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you create a <xref:System.Windows.Forms.WebBrowserNavigatingEventHandler> delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see [Handling and Raising Events](/dotnet/standard/events/).
## Examples
The following code example demonstrates how to use a handler for the <xref:System.Windows.Forms.WebBrowser.Navigating?displayProperty=nameWithType> event to cancel navigation when a Web page form has not been filled in. The <xref:System.Windows.Forms.WebBrowser.Document%2A?displayProperty=nameWithType> property is used to determine whether the form input field contains a value. This example requires that your form contains a <xref:System.Windows.Forms.WebBrowser> control called `webBrowser1`.
:::code language="csharp" source="~/snippets/csharp/System.Windows.Forms/WebBrowser/.ctor/WebBrowserMisc.cs" id="Snippet30":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Winforms/WebBrowserMisc/vb/WebBrowserMisc.vb" id="Snippet30":::
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.WebBrowser" />
<altmember cref="E:System.Windows.Forms.WebBrowser.Navigating" />
<altmember cref="T:System.Windows.Forms.WebBrowserNavigatingEventArgs" />
<related type="Article" href="/dotnet/standard/events/">Handling and Raising Events</related>
</Docs>
</Type>