BarItemLink.UserDefine Property
Gets or sets link options that specify which link settings are determined by a user.
Namespace: DevExpress.XtraBars
Assembly: DevExpress.XtraBars.v24.2.dll
NuGet Package: DevExpress.Win.Navigation
#Declaration
[Browsable(false)]
[XtraSerializableProperty(999)]
public BarLinkUserDefines UserDefine { get; set; }
#Property Value
Type | Description |
---|---|
Bar |
A bitwise combination of Bar |
Available values:
Name | Description |
---|---|
None | If active, disables all other options. |
Caption | If active, the link’s caption is specified by the Bar |
Glyph | If active, the link’s image is specified by the Bar |
Paint |
If active, the link’s painting style is specified by the Bar |
Width | If active, the link’s width is specified by the Bar |
Key |
If active, a key tip has been assigned to a link via the Bar |
Drop |
If active, a key tip has been assigned to a link via the Bar |
Ribbon |
If active, the link’s style is specified by the Bar |
Alignment | If active, the link’s alignment is specified by the Bar |
Edit |
If active, the width of an editor within the Bar |
#Remarks
This property controls whose link settings can be determined by a user. It specifies whether users can apply different captions, paint styles, widths and glyphs to individual links that correspond to the same item. Note that single options can be enabled/disabled only in code, as shown in the example below. To disable all user defined options, call the BarItemLink.Reset method.
#Example
The sample code below demonstrates how to check whether the specified link option (BarLinkUserDefines.Caption in our case) is active. If the option is currently disabled, it is activated.
using DevExpress.XtraBars;
// ...
if ((item1.Links[0].UserDefine & BarLinkUserDefines.Caption) == 0)
item1.Links[0].UserDefine |= BarLinkUserDefines.Caption;