Version

IsSelected Property (UltraNavigationBarLocation)

Returns whether this UltraNavigationBarLocation is currently in the selected state.
Syntax
'Declaration
 
Public Overridable ReadOnly Property IsSelected As Boolean
public virtual bool IsSelected {get;}
Remarks

"Selected" in the context of an UltraNavigationBarLocation is defined as the one location referenced by its Parent locations's SelectedLocation property. Any given location, including the RootLocation, can have only one of it child locations selected at any given time. The UltraNavigationBar's SelectedLocation property always returns the terminal location on the navigation path; this location is defined as the only member of the navigation path that returns null from its SelectedLocation property. All locations in the control's navigation path are the SelectedLocation of their parent location.

The UltraNavigationBarLocation instance returned by the RootLocation property always returns true from the IsSelected property.

Example
The following code sample demonstrates how to use the state-related properties of the UltraNavigationBarLocation class:

Imports System
Imports System.Drawing
Imports System.IO
Imports System.Collections.Generic
Imports System.ComponentModel
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.Misc
Imports Infragistics.Win.Misc.UltraWinNavigationBar

		Private Function GetLocationState(ByVal location As UltraNavigationBarLocation) As LocationUIState

        If (location Is Nothing) Then Throw New ArgumentNullException("location")

        Dim retVal As LocationUIState = LocationUIState.Normal

        If location.IsButtonActive Then retVal = retVal Or LocationUIState.ButtonActive
        If location.IsDropDownButtonHotTracked Then retVal = retVal Or LocationUIState.DropDownButtonHotTracked
        If location.IsExpanded Then retVal = retVal Or LocationUIState.Expanded
        If location.IsListItemActive Then retVal = retVal Or LocationUIState.ListItemActive
        If location.IsListItemHotTracked Then retVal = retVal Or LocationUIState.ListItemHotTracked
        If location.IsPressed Then retVal = retVal Or LocationUIState.Pressed
        If location.IsSelected Then retVal = retVal Or LocationUIState.Selected
        If location.IsTextButtonHotTracked Then retVal = retVal Or LocationUIState.TextButtonHotTracked

        Return retVal

		End Function
using System;
using System.Drawing;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.Misc;
using Infragistics.Win.Misc.UltraWinNavigationBar;

    private LocationUIState GetLocationState( UltraNavigationBarLocation location )
    {
        if ( location == null )
            throw new ArgumentNullException("location");

        LocationUIState retVal = LocationUIState.Normal;

        if ( location.IsButtonActive )
            retVal |= LocationUIState.ButtonActive;

        if ( location.IsDropDownButtonHotTracked )
            retVal |= LocationUIState.DropDownButtonHotTracked;

        if ( location.IsExpanded )
            retVal |= LocationUIState.Expanded;

        if ( location.IsListItemActive )
            retVal |= LocationUIState.ListItemActive;

        if ( location.IsListItemHotTracked )
            retVal |= LocationUIState.ListItemHotTracked;

        if ( location.IsPressed )
            retVal |= LocationUIState.Pressed;

        if ( location.IsSelected )
            retVal |= LocationUIState.Selected;

        if ( location.IsTextButtonHotTracked )
            retVal |= LocationUIState.TextButtonHotTracked;

        return retVal;
    }
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also