Version

IsExpanded Property

Gets/sets whether this instance is currently in the expanded state.
Syntax
'Declaration
 
Public Property IsExpanded As Boolean
public bool IsExpanded {get; set;}
Exceptions
ExceptionDescription
System.ExceptionThrown when the property is set to true on an UltraNavigationBarLocation instance which is not associated with an UltraNavigationBar.
Remarks

The IsExpanded property returns true when the ExpandedLocation proeprty returns a reference to this instance. Setting the IsExpanded property to true is the functional equivalent of setting the ExpandedLocation property to reference this instance. Setting the IsExpanded property to false is the functional equivalent of setting the ExpandedLocation property to null.

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