NotifyEventArgs class

Applies to Windows and Windows Phone

Provides data for the ScriptNotify event.

Inheritance

Object
  NotifyEventArgs

Syntax


public sealed class NotifyEventArgs

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The NotifyEventArgs class has these types of members:

Methods

The NotifyEventArgs class inherits methods from the Object class.

Properties

The NotifyEventArgs class has these properties.

PropertyAccess typeDescription

CallingUri

Read-onlyGets the Uniform Resource Identifier (URI) of the page containing the script that raised the ScriptNotify event.

Value

Read-onlyGets the method name as passed to the application.

 

Examples

The following code example demonstrates the use of the ScriptNotify event in apps compiled for Windows 8. Starting with Windows 8.1, omit the lines related to AllowedScriptNotifyUris. For more info, see the WebView class overview.


public MyPage()
{
    this.InitializeComponent();
    MyWebView.ScriptNotify += MyWebView_ScriptNotify;

    // Here we have to set the AllowedScriptNotifyUri property because we are 
    // navigating to some site where we don't own the content and we want to 
    // allow window.external.notify() to pass data back to the app.
    List<Uri> allowedUris = new List<Uri>();
    allowedUris.Add(new Uri("http://www.bing.com"));
    MyWebView.AllowedScriptNotifyUris = allowedUris;
}

void MyWebView_ScriptNotify(object sender, NotifyEventArgs e)
{
    // Respond to the script notification.
}


Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

WebView
ScriptNotify

 

 

Show:
© 2015 Microsoft