Back to Devexpress

RepositoryItemMemoEdit.AdvancedModeOptions Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemmemoedit-bc36573d.md

latest7.4 KB
Original Source

RepositoryItemMemoEdit.AdvancedModeOptions Property

Gets Advanced Mode options.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Appearance")]
public MemoEditAdvancedModeOptions AdvancedModeOptions { get; }
vb
<DXCategory("Appearance")>
Public ReadOnly Property AdvancedModeOptions As MemoEditAdvancedModeOptions

Property Value

TypeDescription
DevExpress.XtraEditors.Repository.MemoEditAdvancedModeOptions

Advanced Mode options.

|

Remarks

Activate the UseAdvancedMode property to switch the editor to Advanced Mode.

Use the AdvancedModeOptions property to customize Advanced Mode features.

csharp
// Enable Advanced Mode
memoEdit1.Properties.UseAdvancedMode = DefaultBoolean.True;
// Enable caret animation
memoEdit1.Properties.AdvancedModeOptions.AllowCaretAnimation = DefaultBoolean.True;
// Animate selection
memoEdit1.Properties.AdvancedModeOptions.AllowSelectionAnimation = DefaultBoolean.True;
// Set selection color
memoEdit1.Properties.AdvancedModeOptions.SelectionColor = Color.Yellow;
vb
' Enable Advanced Mode
memoEdit1.Properties.UseAdvancedMode = DefaultBoolean.[True]
' Enable caret animation
memoEdit1.Properties.AdvancedModeOptions.AllowCaretAnimation = DefaultBoolean.[True]
' Animate selection
memoEdit1.Properties.AdvancedModeOptions.AllowSelectionAnimation = DefaultBoolean.[True]
' Set selection color
memoEdit1.Properties.AdvancedModeOptions.SelectionColor = Color.Yellow

Features

Caret and Selection Animations

The redesigned control painter implements more responsive and smooth animations.

To disable these effects, use AdvancedModeOptions.AllowCaretAnimation and AdvancedModeOptions.AllowSelectionAnimation properties.

Themed Selection Color

The selection color depends on the current application skin.

Embedded Labels

Set the AdvancedModeOptions.Label property to display an editor caption inside the text box. This caption moves upward when the editor is focused.

Use the AdvancedModeOptions.LabelAppearance property to customize appearance settings of the embedded label (caption).

Text Autocompletion

The autocomplete functionality displays suggestions to complete words that a user types in a text editor.

Use the AdvancedModeOptions.AutoCompleteMode property to enable the autocomplete functionality. You can choose one of the following options:

  • Suggest - The editor displays a drop-down list with suggestions when a user types the first word in the edit box.

  • Append - The editor automatically completes the first entered word in the edit box. The editor uses the first matching suggestion from a source of suggestions.

  • SuggestAppend - The editor uses a combination of the Append and Suggest options — it automatically completes the first word in the edit box, and displays a drop-down list with suggestions.

  • SuggestSingleWord - The editor displays a drop-down list with custom suggestions every time a user types a new word in the edit box. The editor automatically sets the AutoCompleteSource option to CustomSource in SuggestSingleWord mode. Use the CustomizeAutoCompleteSource event, or AutoCompleteCustomSource collection to specify the custom auto-complete suggestions.

Use the AdvancedModeOptions.AutoCompleteSource property to specify the source of autocomplete strings. To supply custom autocomplete strings, set the AutoCompleteSource property to CustomSource, then handle the CustomizeAutoCompleteSource event or populate the AdvancedModeOptions.AutoCompleteCustomSource collection.

Emoji Support

Users can press “Win+.“ to enter emojis from the Windows library. If the AdvancedModeOptions.UseDirectXPaint property is disabled, emojis are grayed out.

Custom Text Highlighting and Painting

You can handle the CustomHighlightText event to highlight or paint specific strings within the control’s text in a custom manner:

  • Highlight strings with custom foreground and background colors.
  • Add padding for text blocks.
  • Specify a painter that draws text using a custom font.
  • Specify a painter that replaces strings with custom graphics (for example, icons or emojis).

Run Demo: Memo Edit

Disable Keyboard Shortcuts

Set the AdvancedModeOptions.ShortcutsEnabled property to false to disable all keyboard shortcuts within the editor.

WXI Skin

The WXI vector skin utilizes Advanced Mode to paint rounded editor corners and color accents. Advanced Mode cannot be disabled while this skin is active.

Important

In Advanced Mode or when the WXI Skin is applied, use the Appearance.BackColor property to specify the editor’s background color. Other appearance settings that specify the background color of the editor in different states are ignored (for example, the AppearanceReadOnly.BackColor, AppearanceFocused.BackColor, AppearanceDisabled.BackColor).

csharp
if (textEdit1.Properties.ReadOnly) {
    textEdit1.Properties.Appearance.BackColor = Color.LightGray;
}
vb
If textEdit1.Properties.ReadOnly Then
    textEdit1.Properties.Appearance.BackColor = Color.LightGray
End If

See Also

UseAdvancedMode

RepositoryItemMemoEdit Class

RepositoryItemMemoEdit Members

DevExpress.XtraEditors.Repository Namespace