Share via


NavigationEventArgs Class

Definition

Provides data for events that are raised when navigation is performed. This class cannot be inherited.

public ref class NavigationEventArgs sealed : EventArgs
public sealed class NavigationEventArgs : EventArgs
type NavigationEventArgs = class
    inherit EventArgs
Public NotInheritable Class NavigationEventArgs
Inherits EventArgs
Inheritance
NavigationEventArgs

Examples

The following example uses the NavigationEventArgs object in an event.

private void OnNavigationServiceNavigationPerformed(
    object sender, NavigationEventArgs e) {
    NavigationItem item = e.NewItem;
    if (e.IsNew && (item != null) && 
        (item.PageType != null)) {
        // Ignore Home page navigations
        if (String.Equals(item.PageType.Name, "Homepage",
            StringComparison.OrdinalIgnoreCase)) {
            return;
        }

        MRUList<MRUPageInfo> features =
            _features[(int)item.ConfigurationPath.PathType];
        features.Add(new MRUPageInfo(
            item.PageType.AssemblyQualifiedName)
            );
    }
}

Remarks

This class provides the information for connection and page navigation in IIS Manager.

The NavigationEventHandler receives an argument of type NavigationEventArgs.

Constructors

NavigationEventArgs(NavigationItem, NavigationItem, Boolean)

Properties

IsNew

Gets a value indicating whether the navigation action is from a new navigation session or an existing navigation session.

NewItem

Gets the item that is being navigated to.

OldItem

Gets the item that is being navigated from.

Applies to

See also