Exception | Description |
---|---|
System.ArgumentOutOfRangeException | Thrown when the property is set to a value that is less than zero. |
An UltraNavigationBarLocation which appears in the navigation path (i.e., is the SelectedLocation or one of its ancestors) is represented in the user interface by the LocationTextButtonUIElement element. By default, the width of this element is based on the amount of horizontal space necessary to display its text (and/or image, depending on the value of the TextButtonDisplayStyle). The MaximumTextButtonWidth property provides a way to limit the amount of horizontal space that is occupied by a location that appears in the navigation path.
Note: Setting the property on the instance returned from the LocationSettings property affects all UltraNavigationBarLocation displayed by the control that do not have a more specific setting; setting the property on the instance returned from the Settings property affects only that instance, and overrides the setting at the control level.
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); } }
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