Merge pull request #1135 from dotnet/adegeo-links

Correct .NET Framework links that pointed to old .NET 5 URLs
This commit is contained in:
Andy (Steve) De George
2021-08-11 12:04:34 -07:00
committed by GitHub
parent 2aea7ebcbf
commit e9fcf43083
162 changed files with 323 additions and 323 deletions
@@ -12,7 +12,7 @@ helpviewer_keywords:
ms.assetid: e223c759-f8c4-4717-acfb-b1e40bdf5f3b
---
# Button Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Button> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Button> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## Button Parts
The <xref:System.Windows.Controls.Button> control does not have any named parts.
@@ -49,5 +49,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: f4fcf046-7a8f-41b8-b5a8-534b64e0345c
---
# Calendar Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Calendar> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Calendar> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## Calendar Parts
The following table lists the named parts for the <xref:System.Windows.Controls.Calendar> control.
@@ -127,5 +127,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -48,4 +48,4 @@ Calendar controls
## See also
- [Controls](index.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Styling and Templating](styles-templates-overview.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: bfdaec96-d101-4d3d-864d-c27e6b621d03
---
# CheckBox Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.CheckBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.CheckBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## CheckBox Parts
The <xref:System.Windows.Controls.CheckBox> control does not have any named parts.
@@ -51,5 +51,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -12,7 +12,7 @@ helpviewer_keywords:
ms.assetid: b0662fa1-16d7-4320-b26b-c1804e565a44
---
# ComboBox Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.ComboBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.ComboBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## ComboBox Parts
The following table lists the named parts for the <xref:System.Windows.Controls.ComboBox> control.
@@ -78,5 +78,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: 342d1f17-c406-4f94-8f55-867c5f3ea511
---
# ContextMenu Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.ContextMenu> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.ContextMenu> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## ContextMenu Parts
The <xref:System.Windows.Controls.ContextMenu> control does not have any named parts.
@@ -44,5 +44,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -34,7 +34,7 @@ Historically, if you wanted to get a customized experience from an existing cont
- **Triggers.** A <xref:System.Windows.Trigger> allows you to dynamically change the appearance and behavior of a control without creating a new control. For example, suppose you have multiple <xref:System.Windows.Controls.ListBox> controls in your application and want the items in each <xref:System.Windows.Controls.ListBox> to be bold and red when they are selected. Your first instinct might be to create a class that inherits from <xref:System.Windows.Controls.ListBox> and override the <xref:System.Windows.Controls.Primitives.Selector.OnSelectionChanged%2A> method to change the appearance of the selected item, but a better approach is to add a trigger to a style of a <xref:System.Windows.Controls.ListBoxItem> that changes the appearance of the selected item. A trigger enables you to change property values or take actions based on the value of a property. An <xref:System.Windows.EventTrigger> enables you to take actions when an event occurs.
For more information about styles, templates, and triggers, see [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview).
For more information about styles, templates, and triggers, see [Styling and Templating](styles-templates-overview.md).
In general, if your control mirrors the functionality of an existing control, but you want the control to look different, you should first consider whether you can use any of the methods discussed in this section to change the existing control's appearance.
@@ -179,7 +179,7 @@ The following example uses binding to accomplish the same thing.
[!code-xaml[UserControlNumericUpDown#Binding](~/samples/snippets/csharp/VS_Snippets_Wpf/UserControlNumericUpDown/CSharp/NumericUpDown.xaml#binding)]
For more information about data binding, see [Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview).
For more information about data binding, see [Data Binding Overview](../data/data-binding-overview.md).
### Design for Designers
@@ -20,4 +20,4 @@ This category covers the various base classes, interfaces and other elements and
## See also
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Styling and Templating](styles-templates-overview.md)
@@ -70,4 +70,4 @@ Controls in Windows Presentation Foundation (WPF) have a <xref:System.Windows.Co
## Related Sections
[Control Authoring Overview](control-authoring-overview.md)
[Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
[Styling and Templating](styles-templates-overview.md)
@@ -48,7 +48,7 @@ This topic contains the following sections:
## Prerequisites
This topic assumes that you know how to create a new <xref:System.Windows.Controls.ControlTemplate> for an existing control, are familiar with what the elements on a control contract are, and understand the concepts discussed in [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic assumes that you know how to create a new <xref:System.Windows.Controls.ControlTemplate> for an existing control, are familiar with what the elements on a control contract are, and understand the concepts discussed in [Create a template for a control](how-to-create-apply-template.md).
> [!NOTE]
> To create a control that can have its appearance customized, you must create a control that inherits from the <xref:System.Windows.Controls.Control> class or one of its subclasses other than <xref:System.Windows.Controls.UserControl>. A control that inherits from <xref:System.Windows.Controls.UserControl> is a control that can be quickly created, but it does not use a <xref:System.Windows.Controls.ControlTemplate> and you cannot customize its appearance.
@@ -71,7 +71,7 @@ When you define the visual structure and visual behavior in the <xref:System.Win
## Defining the Visual Structure and Visual Behavior of a Control in a ControlTemplate
When you create your custom control by using the parts and states model, you define the control's visual structure and visual behavior in its <xref:System.Windows.Controls.ControlTemplate> instead of in its logic. The visual structure of a control is the composite of <xref:System.Windows.FrameworkElement> objects that make up the control. The visual behavior is the way the control appears when it is in a certain state. For more information about creating a <xref:System.Windows.Controls.ControlTemplate> that specifies the visual structure and visual behavior of a control, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
When you create your custom control by using the parts and states model, you define the control's visual structure and visual behavior in its <xref:System.Windows.Controls.ControlTemplate> instead of in its logic. The visual structure of a control is the composite of <xref:System.Windows.FrameworkElement> objects that make up the control. The visual behavior is the way the control appears when it is in a certain state. For more information about creating a <xref:System.Windows.Controls.ControlTemplate> that specifies the visual structure and visual behavior of a control, see [Create a template for a control](how-to-create-apply-template.md).
In the example of the `NumericUpDown` control, the visual structure includes two <xref:System.Windows.Controls.Primitives.RepeatButton> controls and a <xref:System.Windows.Controls.TextBlock>. If you add these controls in the code of the `NumericUpDown` control--in its constructor, for example--the positions of those controls would be unalterable. Instead of defining the control's visual structure and visual behavior in its code, you should define it in the <xref:System.Windows.Controls.ControlTemplate>. Then an application developer to customize the position of the buttons and <xref:System.Windows.Controls.TextBlock> and specify what behavior occurs when `Value` is negative because the <xref:System.Windows.Controls.ControlTemplate> can be replaced.
@@ -79,7 +79,7 @@ The following example shows the visual structure of the `NumericUpDown` control,
[!code-xaml[VSMCustomControl#VisualStructure](~/samples/snippets/csharp/VS_Snippets_Wpf/vsmcustomcontrol/csharp/window1.xaml#visualstructure)]
A visual behavior of the `NumericUpDown` control is that the value is in a red font if it is negative. If you change the <xref:System.Windows.Controls.TextBlock.Foreground%2A> of the <xref:System.Windows.Controls.TextBlock> in code when the `Value` is negative, the `NumericUpDown` will always show a red negative value. You specify the visual behavior of the control in the <xref:System.Windows.Controls.ControlTemplate> by adding <xref:System.Windows.VisualState> objects to the <xref:System.Windows.Controls.ControlTemplate>. The following example shows the <xref:System.Windows.VisualState> objects for the `Positive` and `Negative` states. `Positive` and `Negative` are mutually exclusive (the control is always in exactly one of the two), so the example puts the <xref:System.Windows.VisualState> objects into a single <xref:System.Windows.VisualStateGroup>. When the control goes into the `Negative` state, the <xref:System.Windows.Controls.TextBlock.Foreground%2A> of the <xref:System.Windows.Controls.TextBlock> turns red. When the control is in the `Positive` state, the <xref:System.Windows.Controls.TextBlock.Foreground%2A> returns to its original value. Defining <xref:System.Windows.VisualState> objects in a <xref:System.Windows.Controls.ControlTemplate> is further discussed in [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
A visual behavior of the `NumericUpDown` control is that the value is in a red font if it is negative. If you change the <xref:System.Windows.Controls.TextBlock.Foreground%2A> of the <xref:System.Windows.Controls.TextBlock> in code when the `Value` is negative, the `NumericUpDown` will always show a red negative value. You specify the visual behavior of the control in the <xref:System.Windows.Controls.ControlTemplate> by adding <xref:System.Windows.VisualState> objects to the <xref:System.Windows.Controls.ControlTemplate>. The following example shows the <xref:System.Windows.VisualState> objects for the `Positive` and `Negative` states. `Positive` and `Negative` are mutually exclusive (the control is always in exactly one of the two), so the example puts the <xref:System.Windows.VisualState> objects into a single <xref:System.Windows.VisualStateGroup>. When the control goes into the `Negative` state, the <xref:System.Windows.Controls.TextBlock.Foreground%2A> of the <xref:System.Windows.Controls.TextBlock> turns red. When the control is in the `Positive` state, the <xref:System.Windows.Controls.TextBlock.Foreground%2A> returns to its original value. Defining <xref:System.Windows.VisualState> objects in a <xref:System.Windows.Controls.ControlTemplate> is further discussed in [Create a template for a control](how-to-create-apply-template.md).
> [!NOTE]
> Be sure to set the <xref:System.Windows.VisualStateManager.VisualStateGroups%2A?displayProperty=nameWithType> attached property on the root <xref:System.Windows.FrameworkElement> of the <xref:System.Windows.Controls.ControlTemplate>.
@@ -249,5 +249,5 @@ The following example shows the logic for the `NumericUpDown`.
## See also
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Create a template for a control](how-to-create-apply-template.md)
- [Control Customization](control-customization.md)
@@ -12,7 +12,7 @@ helpviewer_keywords:
ms.assetid: 9cb31d63-f148-4d25-b079-816e73f988c7
---
# DataGrid Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.DataGrid> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.DataGrid> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## DataGrid Parts
The following table lists the named parts for the <xref:System.Windows.Controls.DataGrid> control.
@@ -170,5 +170,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -54,8 +54,8 @@ The <xref:System.Windows.Controls.DataGrid> control enables you to display and e
## See also
- <xref:System.Windows.Controls.DataGrid>
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview)
- [Styling and Templating](styles-templates-overview.md)
- [Data Binding Overview](../data/data-binding-overview.md)
- [Data Templating Overview](../data/data-templating-overview.md)
- [Controls](index.md)
- [WPF Content Model](wpf-content-model.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: c430a657-692f-44bd-a549-2341f92d6115
---
# DatePicker Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.DatePicker> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.DatePicker> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## DatePicker Parts
The following table lists the named parts for the <xref:System.Windows.Controls.DatePicker> control.
@@ -76,5 +76,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -21,4 +21,4 @@ DatePicker Control
## See also
- [Controls](index.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Styling and Templating](styles-templates-overview.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: 6bd4ff8f-ea6a-4084-ac58-e7a67446ce1c
---
# DocumentViewer Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.DocumentViewer> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.DocumentViewer> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## DocumentViewer Parts
The following table lists the named parts for the <xref:System.Windows.Controls.DocumentViewer> control.
@@ -47,5 +47,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: da2e5a1c-5230-4c21-98a5-59c7895facd7
---
# Expander Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Expander> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Expander> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## Expander Parts
The <xref:System.Windows.Controls.Expander> control does not have any named parts.
@@ -53,5 +53,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: a01c32e2-c951-46a0-a82f-2614ca241f0b
---
# Frame Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Frame> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Frame> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## Frame Parts
The following table lists the named parts for the <xref:System.Windows.Controls.Frame> control.
@@ -46,5 +46,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: 33df7037-0a1b-476f-b9d0-41566a777699
---
# GroupBox Styles and Templates
<a name="introduction"></a> This topic describes the styles and templates for the <xref:System.Windows.Controls.GroupBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
<a name="introduction"></a> This topic describes the styles and templates for the <xref:System.Windows.Controls.GroupBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
<a name="groupbox_parts"></a>
## GroupBox Parts
@@ -45,5 +45,5 @@ ms.assetid: 33df7037-0a1b-476f-b9d0-41566a777699
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -24,7 +24,7 @@ This document summarizes a set of best practices to consider when designing a co
- Data templates.
For an introduction to styling and templating, see [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview).
For an introduction to styling and templating, see [Styling and Templating](styles-templates-overview.md).
<a name="Before_You_Start__Understanding_Your_Control"></a>
@@ -121,5 +121,5 @@ To understand your control's common usage, it's good to think about the value pr
## See also
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Styling and Templating](styles-templates-overview.md)
- [Control Authoring Overview](control-authoring-overview.md)
@@ -47,7 +47,7 @@ When using the <xref:System.Windows.Controls.DataGrid> control, you can customiz
[!code-xaml[DataGrid_RowDetails#3](~/samples/snippets/csharp/VS_Snippets_Wpf/datagrid_rowdetails/cs/app.xaml#3)]
4. On the <xref:System.Windows.DataTemplate>, set the [x:Key Directive](/dotnet/desktop-wpf/xaml-services/xkey-directive) to a value that uniquely identifies the data template.
4. On the <xref:System.Windows.DataTemplate>, set the [x:Key Directive](/dotnet/desktop/xaml-services/xkey-directive) to a value that uniquely identifies the data template.
5. In the <xref:System.Windows.Controls.DataGrid> element, set the <xref:System.Windows.Controls.DataGrid.RowDetailsTemplate%2A> property to the resource defined in the previous steps. Assign the resource as a static resource.
@@ -21,5 +21,5 @@ There might be times when you want to bind a <xref:System.Windows.Controls.TreeV
## See also
- [Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview)
- [Data Binding Overview](../data/data-binding-overview.md)
- [Data Templating Overview](../data/data-templating-overview.md)
@@ -23,7 +23,7 @@ By default, the content of each column in a <xref:System.Windows.Controls.ListVi
## See also
- [Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview)
- [Data Binding Overview](../data/data-binding-overview.md)
- [Data Templating Overview](../data/data-templating-overview.md)
- [Bind to XML Data Using an XMLDataProvider and XPath Queries](../data/how-to-bind-to-xml-data-using-an-xmldataprovider-and-xpath-queries.md)
- [ListView Overview](listview-overview.md)
@@ -25,6 +25,6 @@ This example shows how to find elements that are generated by a <xref:System.Win
## See also
- [Find DataTemplate-Generated Elements](../data/how-to-find-datatemplate-generated-elements.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Styling and Templating](styles-templates-overview.md)
- [WPF XAML Namescopes](../advanced/wpf-xaml-namescopes.md)
- [Trees in WPF](../advanced/trees-in-wpf.md)
@@ -38,9 +38,9 @@ To group, sort, and filter data in a <xref:System.Windows.Controls.DataGrid> con
[!code-csharp[DataGrid_GroupSortFilter#101](~/samples/snippets/csharp/VS_Snippets_Wpf/DataGrid_GroupSortFilter/CS/MainWindow.xaml.cs#101)]
[!code-vb[DataGrid_GroupSortFilter#101](~/samples/snippets/visualbasic/VS_Snippets_Wpf/DataGrid_GroupSortFilter/VB/MainWindow.xaml.vb#101)]
2. In XAML, create an instance of the collection class and set the [x:Key Directive](/dotnet/desktop-wpf/xaml-services/xkey-directive).
2. In XAML, create an instance of the collection class and set the [x:Key Directive](/dotnet/desktop/xaml-services/xkey-directive).
3. In XAML, create an instance of the <xref:System.Windows.Data.CollectionViewSource> class, set the [x:Key Directive](/dotnet/desktop-wpf/xaml-services/xkey-directive), and set the instance of your collection class as the <xref:System.Windows.Data.CollectionViewSource.Source%2A>.
3. In XAML, create an instance of the <xref:System.Windows.Data.CollectionViewSource> class, set the [x:Key Directive](/dotnet/desktop/xaml-services/xkey-directive), and set the instance of your collection class as the <xref:System.Windows.Data.CollectionViewSource.Source%2A>.
[!code-xaml[DataGrid_GroupSortFilter#201](~/samples/snippets/csharp/VS_Snippets_Wpf/DataGrid_GroupSortFilter/CS/WindowSnips1.xaml#201)]
@@ -142,7 +142,7 @@ To test this example, you will need to adjust the DGGroupSortFilterExample name
## See also
- [Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview)
- [Data Binding Overview](../data/data-binding-overview.md)
- [Create and Bind to an ObservableCollection](../data/how-to-create-and-bind-to-an-observablecollection.md)
- [Filter Data in a View](../data/how-to-filter-data-in-a-view.md)
- [Sort Data in a View](../data/how-to-sort-data-in-a-view.md)
@@ -29,7 +29,7 @@ To handle an event for an item in a <xref:System.Windows.Controls.ListView>, you
## See also
- <xref:System.Xml.XmlElement>
- [Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Data Binding Overview](../data/data-binding-overview.md)
- [Styling and Templating](styles-templates-overview.md)
- [Bind to XML Data Using an XMLDataProvider and XPath Queries](../data/how-to-bind-to-xml-data-using-an-xmldataprovider-and-xpath-queries.md)
- [ListView Overview](listview-overview.md)
@@ -17,7 +17,7 @@ The <xref:System.Windows.Controls.DataGrid> control enables you to perform valid
### To validate individual cell values
- Specify one or more validation rules on the binding used with a column. This is similar to validating data in simple controls, as described in [Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview).
- Specify one or more validation rules on the binding used with a column. This is similar to validating data in simple controls, as described in [Data Binding Overview](../data/data-binding-overview.md).
The following example shows a <xref:System.Windows.Controls.DataGrid> control with four columns bound to different properties of a business object. Three of the columns specify the <xref:System.Windows.Controls.ExceptionValidationRule> by setting the <xref:System.Windows.Data.Binding.ValidatesOnExceptions%2A> property to `true`.
@@ -89,6 +89,6 @@ The <xref:System.Windows.Controls.DataGrid> control enables you to perform valid
- <xref:System.Windows.Controls.DataGrid>
- [DataGrid](datagrid.md)
- [Data Binding](/dotnet/desktop-wpf/data/data-binding-overview)
- [Data Binding](../data/data-binding-overview.md)
- [Implement Binding Validation](../data/how-to-implement-binding-validation.md)
- [Implement Validation Logic on Custom Objects](../data/how-to-implement-validation-logic-on-custom-objects.md)
@@ -15,7 +15,7 @@ ms.assetid: bcd25fc7-a52f-4453-b802-2c8d2b335ab8
This example shows how to use the <xref:System.Windows.Controls.TextBox.Text%2A> property to set the initial text contents of a <xref:System.Windows.Controls.TextBox> control.
> [!NOTE]
> Although the [!INCLUDE[TLA#tla_xaml](../../../includes/tlasharptla-xaml-md.md)] version of the example could use the `<TextBox.Text>` tags around the text of each button's <xref:System.Windows.Controls.TextBox> content, it is not necessary because the <xref:System.Windows.Controls.TextBox> applies the <xref:System.Windows.Markup.ContentPropertyAttribute> attribute to the <xref:System.Windows.Controls.TextBox.Text%2A> property. For more information, see [XAML Overview (WPF)](/dotnet/desktop-wpf/fundamentals/xaml).
> Although the [!INCLUDE[TLA#tla_xaml](../../../includes/tlasharptla-xaml-md.md)] version of the example could use the `<TextBox.Text>` tags around the text of each button's <xref:System.Windows.Controls.TextBox> content, it is not necessary because the <xref:System.Windows.Controls.TextBox> applies the <xref:System.Windows.Markup.ContentPropertyAttribute> attribute to the <xref:System.Windows.Controls.TextBox.Text%2A> property. For more information, see [XAML in WPF](../advanced/xaml-in-wpf.md).
## Example
@@ -33,4 +33,4 @@ This example shows how to style a row in a <xref:System.Windows.Controls.ListVie
- <xref:System.Windows.Controls.GridView>
- [How-to Topics](listview-how-to-topics.md)
- [ListView Overview](listview-overview.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Styling and Templating](styles-templates-overview.md)
@@ -36,4 +36,4 @@ The <xref:System.Windows.Controls.ToolBar> defines <xref:System.Windows.Resource
## See also
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Styling and Templating](styles-templates-overview.md)
@@ -49,14 +49,14 @@ ms.assetid: 3f255a8a-35a8-4712-9065-472ff7d75599
[!code-xaml[ControlsOverview#5](~/samples/snippets/csharp/VS_Snippets_Wpf/ControlsOverview/CSharp/AppInCode.xaml#5)]
You can also apply a style to only certain controls of a specific type by assigning a key to the style and specifying that key in the `Style` property of your control. For more information about styles, see [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview).
You can also apply a style to only certain controls of a specific type by assigning a key to the style and specifying that key in the `Style` property of your control. For more information about styles, see [Styling and Templating](styles-templates-overview.md).
### Creating a ControlTemplate
A <xref:System.Windows.Style> allows you to set properties on multiple controls at a time, but sometimes you might want to customize the appearance of a <xref:System.Windows.Controls.Control> beyond what you can do by creating a <xref:System.Windows.Style>. Classes that inherit from the <xref:System.Windows.Controls.Control> class have a <xref:System.Windows.Controls.ControlTemplate>, which defines the structure and appearance of a <xref:System.Windows.Controls.Control>. The <xref:System.Windows.Controls.Control.Template%2A> property of a <xref:System.Windows.Controls.Control> is public, so you can give a <xref:System.Windows.Controls.Control> a <xref:System.Windows.Controls.ControlTemplate> that is different than its default. You can often specify a new <xref:System.Windows.Controls.ControlTemplate> for a <xref:System.Windows.Controls.Control> instead of inheriting from a control to customize the appearance of a <xref:System.Windows.Controls.Control>.
Consider the very common control, <xref:System.Windows.Controls.Button>. The primary behavior of a <xref:System.Windows.Controls.Button> is to enable an application to take some action when the user clicks it. By default, the <xref:System.Windows.Controls.Button> in [!INCLUDE[TLA2#tla_winclient](../../../includes/tla2sharptla-winclient-md.md)] appears as a raised rectangle. While developing an application, you might want to take advantage of the behavior of a <xref:System.Windows.Controls.Button>--that is, by handling the button's click event--but you might change the button's appearance beyond what you can do by changing the button's properties. In this case, you can create a new <xref:System.Windows.Controls.ControlTemplate>.
The following example creates a <xref:System.Windows.Controls.ControlTemplate> for a <xref:System.Windows.Controls.Button>. The <xref:System.Windows.Controls.ControlTemplate> creates a <xref:System.Windows.Controls.Button> with rounded corners and a gradient background. The <xref:System.Windows.Controls.ControlTemplate> contains a <xref:System.Windows.Controls.Border> whose <xref:System.Windows.Controls.Border.Background%2A> is a <xref:System.Windows.Media.LinearGradientBrush> with two <xref:System.Windows.Media.GradientStop> objects. The first <xref:System.Windows.Media.GradientStop> uses data binding to bind the <xref:System.Windows.Media.GradientStop.Color%2A> property of the <xref:System.Windows.Media.GradientStop> to the color of the button's background. When you set the <xref:System.Windows.Controls.Control.Background%2A> property of the <xref:System.Windows.Controls.Button>, the color of that value will be used as the first <xref:System.Windows.Media.GradientStop>. For more information about data binding, see [Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview). The example also creates a <xref:System.Windows.Trigger> that changes the appearance of the <xref:System.Windows.Controls.Button> when <xref:System.Windows.Controls.Primitives.ButtonBase.IsPressed%2A> is `true`.
The following example creates a <xref:System.Windows.Controls.ControlTemplate> for a <xref:System.Windows.Controls.Button>. The <xref:System.Windows.Controls.ControlTemplate> creates a <xref:System.Windows.Controls.Button> with rounded corners and a gradient background. The <xref:System.Windows.Controls.ControlTemplate> contains a <xref:System.Windows.Controls.Border> whose <xref:System.Windows.Controls.Border.Background%2A> is a <xref:System.Windows.Media.LinearGradientBrush> with two <xref:System.Windows.Media.GradientStop> objects. The first <xref:System.Windows.Media.GradientStop> uses data binding to bind the <xref:System.Windows.Media.GradientStop.Color%2A> property of the <xref:System.Windows.Media.GradientStop> to the color of the button's background. When you set the <xref:System.Windows.Controls.Control.Background%2A> property of the <xref:System.Windows.Controls.Button>, the color of that value will be used as the first <xref:System.Windows.Media.GradientStop>. For more information about data binding, see [Data Binding Overview](../data/data-binding-overview.md). The example also creates a <xref:System.Windows.Trigger> that changes the appearance of the <xref:System.Windows.Controls.Button> when <xref:System.Windows.Controls.Primitives.ButtonBase.IsPressed%2A> is `true`.
[!code-xaml[ControlsOverview#6](~/samples/snippets/csharp/VS_Snippets_Wpf/ControlsOverview/CSharp/Window1.xaml#6)]
[!code-xaml[ControlsOverview#7](~/samples/snippets/csharp/VS_Snippets_Wpf/ControlsOverview/CSharp/AppInCode.xaml#7)]
@@ -94,11 +94,11 @@ ms.assetid: 3f255a8a-35a8-4712-9065-472ff7d75599
## See also
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Styling and Templating](styles-templates-overview.md)
- [Controls by Category](controls-by-category.md)
- [Control Library](control-library.md)
- [Data Templating Overview](../data/data-templating-overview.md)
- [Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview)
- [Data Binding Overview](../data/data-binding-overview.md)
- [Input](../advanced/input-wpf.md)
- [Enable a Command](../advanced/how-to-enable-a-command.md)
- [Walkthroughs: Create a Custom Animated Button](walkthroughs-create-a-custom-animated-button.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: c1d5359a-8e4a-4925-ab3e-e92bf6694859
---
# Label Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Label> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Label> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## Label Parts
The <xref:System.Windows.Controls.Label> control does not have any named parts.
@@ -42,5 +42,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: fc5764cb-c27b-495b-88d4-d969a8213ccb
---
# ListBox Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.ListBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.ListBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## ListBox Parts
The <xref:System.Windows.Controls.ListBox> control does not have any named parts.
@@ -64,5 +64,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: d2387356-2171-4785-822a-7247e024b4ee
---
# ListView Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.ListView> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.ListView> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## ListView Parts
The <xref:System.Windows.Controls.ListView> control does not have any named parts.
@@ -64,5 +64,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -25,5 +25,5 @@ The <xref:System.Windows.Controls.ListView> control provides the infrastructure
<xref:System.Windows.Controls.GridView>
## Related Sections
[Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview)
[Data Binding Overview](../data/data-binding-overview.md)
[Data Templating Overview](../data/data-templating-overview.md)
@@ -12,7 +12,7 @@ helpviewer_keywords:
ms.assetid: b89da183-9b87-42c6-ac53-731a42c7b09e
---
# Menu Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Menu> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Menu> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## Menu Parts
The <xref:System.Windows.Controls.Menu> control does not have any named parts.
@@ -71,5 +71,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: 3656055e-3222-43c8-b868-fd0c90cc31a3
---
# NavigationWindow Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Navigation.NavigationWindow> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Navigation.NavigationWindow> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## NavigationWindow Parts
The following table lists the named parts for the <xref:System.Windows.Navigation.NavigationWindow> control.
@@ -47,5 +47,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Navig
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -13,7 +13,7 @@ ms.assetid: deb52107-959f-4a60-b303-d21a0a933060
# PasswordBox Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.PasswordBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.PasswordBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## PasswordBox Parts
@@ -56,5 +56,5 @@ For the complete sample, see [Styling with ControlTemplates Sample](https://gith
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: 935aa600-16e6-4947-a905-37a189a583dd
---
# ProgressBar Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.ProgressBar> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.ProgressBar> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## ProgressBar Parts
The following table lists the named parts for the <xref:System.Windows.Controls.ProgressBar> control.
@@ -50,5 +50,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: 9acf93f7-dd2f-4010-8ce0-1edd81c52ae2
---
# RadioButton Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.RadioButton> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.RadioButton> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## RadioButton Parts
The <xref:System.Windows.Controls.RadioButton> control does not have any named parts.
@@ -51,5 +51,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -13,7 +13,7 @@ ms.assetid: fd340743-f44f-4990-9077-085301469670
# RepeatButton Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Primitives.RepeatButton> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Primitives.RepeatButton> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## RepeatButton Parts
@@ -53,5 +53,5 @@ For the complete sample, see [Styling with ControlTemplates Sample](https://gith
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: 066ea45a-e27d-43b0-adfe-cce6934c22f5
---
# ScrollBar Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Primitives.ScrollBar> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Primitives.ScrollBar> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## ScrollBar Parts
The following table lists the named parts for the <xref:System.Windows.Controls.Primitives.ScrollBar> control.
@@ -49,5 +49,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -57,7 +57,7 @@ Content within a user interface is often larger than a computer screen's display
## Styling a ScrollViewer
Like all controls in Windows Presentation Foundation, the <xref:System.Windows.Controls.ScrollViewer> can be styled in order to change the default rendering behavior of the control. For additional information on control styling, see [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview).
Like all controls in Windows Presentation Foundation, the <xref:System.Windows.Controls.ScrollViewer> can be styled in order to change the default rendering behavior of the control. For additional information on control styling, see [Styling and Templating](styles-templates-overview.md).
<a name="scrollviewer_scroll_vs_paginate"></a>
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: dffdd822-ae69-4946-abaf-710860cd65b2
---
# ScrollViewer Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.ScrollViewer> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.ScrollViewer> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## ScrollViewer Parts
The following table lists the named parts for the <xref:System.Windows.Controls.ScrollViewer> control.
@@ -48,5 +48,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: d89aa97b-075a-4752-9c41-9679df65c491
---
# Slider Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Slider> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Slider> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## Slider Parts
The following table lists the named parts for the <xref:System.Windows.Controls.Slider> control.
@@ -52,5 +52,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: 9f5e1c25-81eb-4756-a0ac-d9e1fbe33ee2
---
# StatusBar Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Primitives.StatusBar> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Primitives.StatusBar> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## StatusBar Parts
The <xref:System.Windows.Controls.Primitives.StatusBar> control does not have any named parts.
@@ -54,5 +54,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -12,7 +12,7 @@ ms.assetid: 7fd571fd-d54a-40fc-b332-4c4015a5b6ff
Windows Presentation Foundation (WPF) styling and templating refer to a suite of features (styles, templates, triggers, and storyboards) that allow an application, document, or user interface (UI) designer to create visually compelling applications and to standardize on a particular look for their product.
## In This Section
[Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
[Styling and Templating](styles-templates-overview.md)
[How to: Find ControlTemplate-Generated Elements](how-to-find-controltemplate-generated-elements.md)
## Reference
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: f6b19a30-f10e-4fa1-96ce-f17a54092ab6
---
# TabControl Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.TabControl> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.TabControl> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## TabControl Parts
The following table lists the named parts for the <xref:System.Windows.Controls.TabControl> control.
@@ -69,5 +69,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -12,7 +12,7 @@ helpviewer_keywords:
ms.assetid: aa99130c-43a1-450f-9b46-c40ae0db0cca
---
# TextBox Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.TextBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.TextBox> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## TextBox Parts
The following table lists the named parts for the <xref:System.Windows.Controls.TextBox> control.
@@ -53,5 +53,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -13,7 +13,7 @@ ms.assetid: 86a49235-62d9-414e-923e-53126e3f930a
# Thumb Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Primitives.Thumb> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Primitives.Thumb> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## Thumb Parts
@@ -53,5 +53,5 @@ For the complete sample, see [Styling with ControlTemplates Sample](https://gith
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -13,7 +13,7 @@ ms.assetid: 54f23f30-4bcb-4f09-8ce4-376a13a255a1
# ToggleButton Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.Primitives.ToggleButton> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.Primitives.ToggleButton> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## ToggleButton Parts
@@ -59,5 +59,5 @@ For the complete sample, see [Styling with ControlTemplates Sample](https://gith
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: bd875f46-4690-46f5-81e0-f11a9822484f
---
# ToolBar Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.ToolBar> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.ToolBar> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## ToolBar Parts
The following table lists the named parts for the <xref:System.Windows.Controls.ToolBar> control.
@@ -49,5 +49,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: 405fe385-4de9-49ee-a448-d8f4d1f740dd
---
# ToolTip Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.ToolTip> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.ToolTip> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## ToolTip Parts
The <xref:System.Windows.Controls.ToolTip> control does not have any named parts.
@@ -44,5 +44,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: a49adb77-0202-4caa-b94a-8bb110d7fa9a
---
# TreeView Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Controls.TreeView> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Controls.TreeView> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## TreeView Parts
The <xref:System.Windows.Controls.TreeView> control does not have any named parts.
@@ -72,5 +72,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Contr
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)
@@ -25,5 +25,5 @@ The <xref:System.Windows.Controls.TreeView> control displays information in a hi
<xref:System.Windows.Controls.TreeViewItem>
## Related Sections
[Data Binding Overview](/dotnet/desktop-wpf/data/data-binding-overview)
[Data Binding Overview](../data/data-binding-overview.md)
[Data Templating Overview](../data/data-templating-overview.md)
@@ -249,7 +249,7 @@ In conclusion, in the process of customizing a button template you have learned
## See also
- [Create a Button by Using XAML](walkthrough-create-a-button-by-using-xaml.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Styling and Templating](styles-templates-overview.md)
- [Animation Overview](../graphics-multimedia/animation-overview.md)
- [Painting with Solid Colors and Gradients Overview](../graphics-multimedia/painting-with-solid-colors-and-gradients-overview.md)
- [Bitmap Effects Overview](../graphics-multimedia/bitmap-effects-overview.md)
@@ -87,7 +87,7 @@ Next, let's set some properties on these buttons to control the button appearanc
![Buttons with a width of 90 and a margin of 10](./media/custom-button-animatedbutton-2.gif "custom_button_AnimatedButton_2")
There is much more you can do with styles, including a variety of ways to fine-tune what objects are targeted, specifying complex property values, and even using styles as input for other styles. For more information, see [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview).
There is much more you can do with styles, including a variety of ways to fine-tune what objects are targeted, specifying complex property values, and even using styles as input for other styles. For more information, see [Styling and Templating](styles-templates-overview.md).
3. **Set a style property value to a resource:** Resources enable a simple way to reuse commonly defined objects and values. It is especially useful to define complex values using resources to make your code more modular. Add the following highlighted markup to app.xaml.
@@ -434,7 +434,7 @@ An easy way to add interactivity (mouse-over, mouse-leave, click, and so on) is
## See also
- [Create a Button by Using Microsoft Expression Blend](walkthrough-create-a-button-by-using-microsoft-expression-blend.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Styling and Templating](styles-templates-overview.md)
- [Animation Overview](../graphics-multimedia/animation-overview.md)
- [Painting with Solid Colors and Gradients Overview](../graphics-multimedia/painting-with-solid-colors-and-gradients-overview.md)
- [Bitmap Effects Overview](../graphics-multimedia/bitmap-effects-overview.md)
@@ -22,7 +22,7 @@ As its name suggests, Windows Presentation Foundation (WPF) is great for making
Demonstrates how to create buttons with custom behavior by using [!INCLUDE[TLA2#tla_xaml](../../../includes/tla2sharptla-xaml-md.md)] and Visual Studio.
## Related Sections
[Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
[Styling and Templating](styles-templates-overview.md)
Describes how styles and templates can be used to determine the appearance and behavior of controls.
[Animation Overview](../graphics-multimedia/animation-overview.md)
@@ -11,7 +11,7 @@ helpviewer_keywords:
ms.assetid: 2dfdf025-347b-4342-bf28-95206c273f35
---
# Window Styles and Templates
This topic describes the styles and templates for the <xref:System.Windows.Window> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template).
This topic describes the styles and templates for the <xref:System.Windows.Window> control. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information, see [Create a template for a control](how-to-create-apply-template.md).
## Window Parts
The <xref:System.Windows.Window> control does not have any named parts.
@@ -43,5 +43,5 @@ This topic describes the styles and templates for the <xref:System.Windows.Windo
- <xref:System.Windows.Controls.ControlTemplate>
- [Control Styles and Templates](control-styles-and-templates.md)
- [Control Customization](control-customization.md)
- [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)
- [Create a template for a control](/dotnet/desktop-wpf/themes/how-to-create-apply-template)
- [Styling and Templating](styles-templates-overview.md)
- [Create a template for a control](how-to-create-apply-template.md)