Back to Devexpress

XtraTabControl.UseMnemonic Property

windowsforms-devexpress-dot-xtratab-dot-xtratabcontrol-38e3d695.md

latest2.4 KB
Original Source

XtraTabControl.UseMnemonic Property

Gets or sets whether mnemonic characters are used to activate tab pages.

Namespace : DevExpress.XtraTab

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(true)]
[DXCategory("Behavior")]
public virtual bool UseMnemonic { get; set; }
vb
<DXCategory("Behavior")>
<DefaultValue(True)>
Public Overridable Property UseMnemonic As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true if mnemonic characters are used to activate tab pages; otherwise, false.

|

Remarks

The XtraTabPage.Text property specifies the caption for the tab page. Tab page captions can contain mnemonic characters. These are underlined characters that allow an end-user to activate a tab page (see XtraTabControl.SelectedTabPage) using the corresponding keyboard shortcut (Alt + mnemonic character). In the figure below, you can see two tab pages which contain mnemonic characters in their captions.

For a character in the caption to be mnemonic, it should be preceded by an ampersand. See the code snippet below.

csharp
xtraTabPage1.Text = "xtraTabPage&1";
xtraTabPage2.Text = "xtraTabPage&2";
vb
xtraTabPage1.Text = "xtraTabPage&1"
xtraTabPage2.Text = "xtraTabPage&2"

If defined in captions, mnemonics are enabled by default. Set the UseMnemonic property to false to disable this feature.

See Also

Text

SelectedTabPage

XtraTabControl Class

XtraTabControl Members

DevExpress.XtraTab Namespace