Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 1.87 KB

File metadata and controls

66 lines (43 loc) · 1.87 KB

EditorTextBox

A textbox meant to edit text. Displays a watermark while no text has been entered.

Supports many markdown shortcuts, when EnableMarkdownShortcuts is set to true. See https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet.

Namespace: Metrolib.Controls
Assembly: Metrolib (in Metrolib.dll)

public sealed class EditorTextBox : System.Windows.Controls.TextBox

Inheritance Object -> DispatcherObject -> DependencyObject -> Visual -> UIElement -> FrameworkElement -> Control -> TextBoxBase -> TextBox -> EditorTextBox

Unfocused

<Metrolib:EditorTextBox Watermark="Enter comment..." />

Image of EditorTextBox, Unfocused

Focused

<Metrolib:EditorTextBox Watermark="Enter comment..." />

Image of EditorTextBox, Focused

Text, Focused

<Metrolib:EditorTextBox Text="The quick brown fox jumps over the lazy dog" Watermark="Enter comment..." TextWrapping="Wrap" />

Image of EditorTextBox, Text, Focused

Text, Unfocused

<Metrolib:EditorTextBox Text="The quick brown fox jumps over the lazy dog" Watermark="Enter comment..." TextWrapping="Wrap" />

Image of EditorTextBox, Text, Unfocused

Disabled

<Metrolib:EditorTextBox Text="The quick brown fox jumps over the lazy dog" Watermark="Enter comment..." TextWrapping="Wrap" IsEnabled="False" />

Image of EditorTextBox, Disabled

Properties

EnableMarkdownShortcuts: System.Boolean
Whether or not this control shall accept shortcuts (key gestures) which insert the appropriate markdown syntax (such as ctrl+b to make text bold, inserts ...). Is disabled by default.

Watermark: System.String
The watermark text that shall appear until Text is no longer empty.