Skip to main content
Bar

BarItemLink.UserWidth Property

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

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v23.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 can be specified by the corresponding item’s BarItem.Width property or by the link’s UserWidth property. The latter gives you the capability to specify the width of a single link. This allows you to provide several links to the same item, but with different widths. The link’s BarLinkUserDefines.Width option determines which of these properties specifies the link’s width. Thus, if this option is enabled, the link’s width is specified by its UserWidth property, otherwise, by the corresponding item’s BarItem.Width property.

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