Skip to main content
Bar

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BarItemLink.UserWidth Property

Gets or sets the link’s width defined by a user.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(false)]
[XtraSerializableProperty]
public int UserWidth { get; set; }

#Property Value

Type Description
Int32

An integer value specifying the link’s width in pixels.

#Remarks

The link’s width is specified by the corresponding item’s BarItem.Width property or by the link’s UserWidth property. The UserWidth property specifies the width of an individual link. This allows you to display several links to the same bar item, but with different widths.

The link’s BarLinkUserDefines.Width option determines which of these properties specifies the link’s width. If this option is enabled, the link’s width is specified by its UserWidth property. Otherwise, the link’s width is specified by the corresponding bar item’s width.

Assigning values to the UserWidth property has effect only for links that correspond to static and edit items represented by the BarStaticItem and BarEditItem objects respectively. As for static items, be sure that the item’s BarStaticItem.AutoSize property is set to the BarStaticItemSize.None value. Otherwise, changing the link’s width will have no effect.

Options that specify which link settings are determined by a user can be accessed using the BarItemLink.UserDefine property. Note that individual options can be enabled/disabled only in code. To disable all user defined options, call the BarItemLink.Reset method.

See Also