Infragistics(R) NetAdvantage(R) Windows Forms
DropDownButtonVisible Property
See Also  Example E-mail your feedback on this topic.
Infragistics.Win.Misc Namespace > UltraNavigationBarPreviousLocationsSettings Class : DropDownButtonVisible Property

Gets/sets whether the button which displays the previous locations dropdown list is displayed in the user interface.


Visual Basic (Declaration) 
Public Property DropDownButtonVisible As Infragistics.Win.DefaultableBoolean
public Infragistics.Win.DefaultableBoolean DropDownButtonVisible {get; set;}


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

Visual BasicCopy Code
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
C#Copy Code
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);


Note: The DropDownButtonVisible property can be set to false to provide additional horizontal space for the navigation path, but does not prevent the previous locations dropdown list from appearing when the F4 key is pressed. To prevent the previous locations dropdown list from appearing altogether, handle the ExitingEditMode event, and set the Infragistics.Win.Misc.UltraWinNavigationBar.ExitingEditModeEventArgs.AddToPreviousLocations property of the event arguments to false.

See Also