Version

DropDownButtonVisible Property (UltraNavigationBarLocationSettings)

Gets/sets whether a dropdown button is displayed for the UltraNavigationBarLocation, and if so, under which circumstances.
Syntax
'Declaration
 
Public Property DropDownButtonVisible As DropDownButtonVisible
public DropDownButtonVisible DropDownButtonVisible {get; set;}
Exceptions
ExceptionDescription
System.NotSupportedExceptionThrown when the property is set to a value other than 'Always' for the RootLocation.
Remarks

By default, a dropdown button is displayed for an UltraNavigationBarLocation only when its Locations collection contains one or more visible members. The exception to this rule is the RootLocation, which always displays a dropdown button. The DropDownButtonVisible property can be set to 'Never' to prevent the dropdown button from appearing, or to 'Always' to force the button to appear regardless of whether it has any children. The latter setting is useful in the case where it is desirable to display something other than the dropdown list of child locations; in this scenario, the end developer would handle the LocationExpanding event, set the 'Cancel' property of its event arguments to true (to prevent the default dropdown list from appearing), and display an alternative list, custom form or control, etc.

Note: The UltraNavigationBar control provides a mechanism through which a Locations collection can be dynamically populated, via the UltraNavigationBar.InitializeLocations event. This event is fired the first time a Locations collection is accessed, but does not fire again during the object's lifetime (unless the NavigationBarLocationsCollection.Reset method is called).

Example
The following code sample demonstrates how to configure the UltraNavigationBar to occupy less space when the current screen resolution is relatively low:

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

    '   Handles the form's 'Load' event.
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        If Screen.PrimaryScreen.Bounds.Width < 1024 Then

            //  Set the SelectedLocationImageVisible property to false to prevent the resolved
            //  image of the SelectedLocation from appearing on the left side of the control.
            this.ultraNavigationBar1.SelectedLocationImageVisible = DefaultableBoolean.False;

            //  Hide the 'Previous Locations' dropdown button; note that end users can still
            //  show the list by pressing the F4 key.
            this.ultraNavigationBar1.PreviousLocationsSettings.DropDownButtonVisible = DefaultableBoolean.False;

            //  Set MaximumTextButtonWidth to 100 to prevent locations with long display text
            //  from occupying too much space.
            this.ultraNavigationBar1.LocationSettings.MaximumTextButtonWidth = 100;

            //  Reduce the size of images.
            this.ultraNavigationBar1.ImageSize = new Size(8, 8);

        End If

    End Sub
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;

    //  Handles the form's 'Load' event.
    private void Form1_Load(object sender, EventArgs e)
    {
        if ( Screen.PrimaryScreen.Bounds.Width < 1024 )
        {
            this.ultraNavigationBar1.SelectedLocationImageVisible = DefaultableBoolean.False;
            this.ultraNavigationBar1.PreviousLocationsSettings.DropDownButtonVisible = DefaultableBoolean.False;
            this.ultraNavigationBar1.LocationSettings.MaximumTextButtonWidth = 100;
            this.ultraNavigationBar1.ImageSize = new Size(8, 8);
        }
    }
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