mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-06 23:43:07 +02:00
@@ -15,7 +15,7 @@ ms.assetid: c19049bb-5ceb-492d-afd2-751dca0ed8e3
|
||||
# Control Styles and Templates
|
||||
Controls in Windows Presentation Foundation (WPF) have a <xref:System.Windows.Controls.ControlTemplate> that contains the visual tree of that control. You can change the structure and appearance of a control by modifying the <xref:System.Windows.Controls.ControlTemplate> of that control. There is no way to replace only part of the visual tree of a control; to change the visual tree of a control you must set the <xref:System.Windows.Controls.Control.Template%2A> property of the control to its new and complete <xref:System.Windows.Controls.ControlTemplate>.
|
||||
|
||||
The desktop themes determine which resource dictionary is used. To get the resource dictionaries for the desktop themes, see [Default WPF Themes](https://github.com/Microsoft/WPF-Samples/tree/master/Graphics/2DTransforms).
|
||||
The desktop themes determine which resource dictionary is used. The resource dictionaries for the desktop themes are included with your Visual Studio installation. The folder that contains the themes is generally located at _C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\\<visual studio edition>\\DesignTools\\SystemThemes\\wpf_, where _\<visual studio edition>_ represents the edition of Visual Studio.
|
||||
|
||||
The following table describes the resource dictionary file names and their corresponding desktop themes.
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ The <xref:System.Windows.Controls.RichTextBox> control enables you to display or
|
||||
|
||||
## TextBox or RichTextBox?
|
||||
|
||||
Both <xref:System.Windows.Controls.RichTextBox> and <xref:System.Windows.Controls.TextBox> allow users to edit text, however, the two controls are used in different scenarios. A <xref:System.Windows.Controls.RichTextBox> is a better choice when it is necessary for the user to edit formatted text, images, tables, or other rich content. For example, editing a document, article, or blog that requires formatting, images, etc is best accomplished using a <xref:System.Windows.Controls.RichTextBox>. A <xref:System.Windows.Controls.TextBox> requires less system resources then a <xref:System.Windows.Controls.RichTextBox> and it is ideal when only plain text needs to be edited (i.e. usage in forms). See [TextBox Overview](textbox-overview.md) for more information on <xref:System.Windows.Controls.TextBox>. The table below summarizes the main features of <xref:System.Windows.Controls.TextBox> and <xref:System.Windows.Controls.RichTextBox>.
|
||||
Both <xref:System.Windows.Controls.RichTextBox> and <xref:System.Windows.Controls.TextBox> allow users to edit text, however, the two controls are used in different scenarios. A <xref:System.Windows.Controls.RichTextBox> is a better choice when it is necessary for the user to edit formatted text, images, tables, or other rich content. For example, editing a document, article, or blog that requires formatting, images, etc is best accomplished using a <xref:System.Windows.Controls.RichTextBox>. A <xref:System.Windows.Controls.TextBox> requires less system resources than a <xref:System.Windows.Controls.RichTextBox> and it is ideal when only plain text needs to be edited (i.e. usage in forms). See [TextBox Overview](textbox-overview.md) for more information on <xref:System.Windows.Controls.TextBox>. The table below summarizes the main features of <xref:System.Windows.Controls.TextBox> and <xref:System.Windows.Controls.RichTextBox>.
|
||||
|
||||
|Control|Real-time Spellchecking|Context Menu|Formatting commands like <xref:System.Windows.Documents.EditingCommands.ToggleBold%2A> (Ctr+B)|<xref:System.Windows.Documents.FlowDocument> content like images, paragraphs, tables, etc.|
|
||||
|-------------|------------------------------|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|
||||
Reference in New Issue
Block a user