diff --git a/includes/visual-property-note.md b/includes/visual-property-note.md new file mode 100644 index 00000000000..bf6ea1c21c1 --- /dev/null +++ b/includes/visual-property-note.md @@ -0,0 +1,3 @@ +> [!NOTE] +> Setting a visual property only has an effect if that property is both present in the control's default template and is set by using a [TemplateBinding](~/docs/framework/wpf/advanced/templatebinding-markup-extension.md). You can find a list of visual properties in the [Changing the Visual Structure of a Control](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md#changing-the-visual-structure-of-a-control) section in the [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md) article. + diff --git a/xml/System.Windows.Controls.Primitives/DatePickerTextBox.xml b/xml/System.Windows.Controls.Primitives/DatePickerTextBox.xml index f3dc047ab94..07e129d70ac 100644 --- a/xml/System.Windows.Controls.Primitives/DatePickerTextBox.xml +++ b/xml/System.Windows.Controls.Primitives/DatePickerTextBox.xml @@ -31,8 +31,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in Button control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ]]> diff --git a/xml/System.Windows.Controls.Primitives/RepeatButton.xml b/xml/System.Windows.Controls.Primitives/RepeatButton.xml index a508a451c8c..8b3c93fd59f 100644 --- a/xml/System.Windows.Controls.Primitives/RepeatButton.xml +++ b/xml/System.Windows.Controls.Primitives/RepeatButton.xml @@ -29,10 +29,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in Button control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a . diff --git a/xml/System.Windows.Controls.Primitives/ScrollBar.xml b/xml/System.Windows.Controls.Primitives/ScrollBar.xml index 0cf91f9dd4e..625f8e9472f 100644 --- a/xml/System.Windows.Controls.Primitives/ScrollBar.xml +++ b/xml/System.Windows.Controls.Primitives/ScrollBar.xml @@ -53,10 +53,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a horizontal that has a range of values between 0 and 100. diff --git a/xml/System.Windows.Controls.Primitives/StatusBar.xml b/xml/System.Windows.Controls.Primitives/StatusBar.xml index b75b51161a6..fb3669787a9 100644 --- a/xml/System.Windows.Controls.Primitives/StatusBar.xml +++ b/xml/System.Windows.Controls.Primitives/StatusBar.xml @@ -44,10 +44,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in Button control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example creates a . diff --git a/xml/System.Windows.Controls.Primitives/Thumb.xml b/xml/System.Windows.Controls.Primitives/Thumb.xml index 54565173932..b89c26455e6 100644 --- a/xml/System.Windows.Controls.Primitives/Thumb.xml +++ b/xml/System.Windows.Controls.Primitives/Thumb.xml @@ -47,8 +47,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in Button control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ]]> diff --git a/xml/System.Windows.Controls.Primitives/ToggleButton.xml b/xml/System.Windows.Controls.Primitives/ToggleButton.xml index 4c30852f98c..74366b9183c 100644 --- a/xml/System.Windows.Controls.Primitives/ToggleButton.xml +++ b/xml/System.Windows.Controls.Primitives/ToggleButton.xml @@ -34,8 +34,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in Button control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ]]> diff --git a/xml/System.Windows.Controls/Button.xml b/xml/System.Windows.Controls/Button.xml index 378033d7a62..1e38b9ac7de 100644 --- a/xml/System.Windows.Controls/Button.xml +++ b/xml/System.Windows.Controls/Button.xml @@ -33,10 +33,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows three buttons that respond to clicks in three different ways. diff --git a/xml/System.Windows.Controls/Calendar.xml b/xml/System.Windows.Controls/Calendar.xml index e2b2d46ccbd..6d06dfabe43 100644 --- a/xml/System.Windows.Controls/Calendar.xml +++ b/xml/System.Windows.Controls/Calendar.xml @@ -66,8 +66,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## XAML Object Element Usage @@ -76,8 +75,6 @@ ``` - - ## Examples The following illustration shows two controls, one with selections and blackout dates and one without. diff --git a/xml/System.Windows.Controls/CheckBox.xml b/xml/System.Windows.Controls/CheckBox.xml index c715ac7e2b6..f8f2cb392fe 100644 --- a/xml/System.Windows.Controls/CheckBox.xml +++ b/xml/System.Windows.Controls/CheckBox.xml @@ -37,10 +37,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example creates a and handles the , , and events. diff --git a/xml/System.Windows.Controls/ComboBox.xml b/xml/System.Windows.Controls/ComboBox.xml index 163e62b9d01..4f668c28f82 100644 --- a/xml/System.Windows.Controls/ComboBox.xml +++ b/xml/System.Windows.Controls/ComboBox.xml @@ -62,10 +62,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example creates a . The example populates the by binding the property to a collection object of type `VacationSpots`. The example also creates a that displays the selected item of the . diff --git a/xml/System.Windows.Controls/ComboBoxItem.xml b/xml/System.Windows.Controls/ComboBoxItem.xml index 81099ed1d56..2cb9721c6b7 100644 --- a/xml/System.Windows.Controls/ComboBoxItem.xml +++ b/xml/System.Windows.Controls/ComboBoxItem.xml @@ -36,8 +36,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ]]> diff --git a/xml/System.Windows.Controls/ContextMenu.xml b/xml/System.Windows.Controls/ContextMenu.xml index c755a8c4eef..85f0f1d84ca 100644 --- a/xml/System.Windows.Controls/ContextMenu.xml +++ b/xml/System.Windows.Controls/ContextMenu.xml @@ -52,10 +52,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example creates a that manipulates the text of a . The example demonstrates how to subscribe to and handle the events of objects in a . diff --git a/xml/System.Windows.Controls/DataGrid.xml b/xml/System.Windows.Controls/DataGrid.xml index 8b81abb007d..589c48241c0 100644 --- a/xml/System.Windows.Controls/DataGrid.xml +++ b/xml/System.Windows.Controls/DataGrid.xml @@ -87,8 +87,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in the DataGrid control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Common Tasks The following table provides information about tasks that are typically associated with the . diff --git a/xml/System.Windows.Controls/DatePicker.xml b/xml/System.Windows.Controls/DatePicker.xml index 478b71513ba..c5aef3d8a6c 100644 --- a/xml/System.Windows.Controls/DatePicker.xml +++ b/xml/System.Windows.Controls/DatePicker.xml @@ -47,8 +47,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in Button control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## XAML Object Element Usage diff --git a/xml/System.Windows.Controls/DocumentViewer.xml b/xml/System.Windows.Controls/DocumentViewer.xml index 56a5297dda6..d22fddc99e4 100644 --- a/xml/System.Windows.Controls/DocumentViewer.xml +++ b/xml/System.Windows.Controls/DocumentViewer.xml @@ -34,8 +34,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ]]> diff --git a/xml/System.Windows.Controls/Expander.xml b/xml/System.Windows.Controls/Expander.xml index 6f27513d3ee..9411495a349 100644 --- a/xml/System.Windows.Controls/Expander.xml +++ b/xml/System.Windows.Controls/Expander.xml @@ -44,10 +44,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a simple control. diff --git a/xml/System.Windows.Controls/Frame.xml b/xml/System.Windows.Controls/Frame.xml index 484ed78269a..7556f0ca2ac 100644 --- a/xml/System.Windows.Controls/Frame.xml +++ b/xml/System.Windows.Controls/Frame.xml @@ -104,10 +104,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a simple control and specify initial source content to load from a URI using the property. diff --git a/xml/System.Windows.Controls/GroupBox.xml b/xml/System.Windows.Controls/GroupBox.xml index e43a3ff74e9..a5e8ca787e5 100644 --- a/xml/System.Windows.Controls/GroupBox.xml +++ b/xml/System.Windows.Controls/GroupBox.xml @@ -36,10 +36,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example defines a control that is titled **My Employee Info**. The control encloses a and a in a . The example sets the property to a . diff --git a/xml/System.Windows.Controls/Label.xml b/xml/System.Windows.Controls/Label.xml index 742280af5d7..e87bfb5a06c 100644 --- a/xml/System.Windows.Controls/Label.xml +++ b/xml/System.Windows.Controls/Label.xml @@ -44,10 +44,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a that uses a binding to set the target. diff --git a/xml/System.Windows.Controls/ListBox.xml b/xml/System.Windows.Controls/ListBox.xml index 69524a1d2d7..f27d29dfa8e 100644 --- a/xml/System.Windows.Controls/ListBox.xml +++ b/xml/System.Windows.Controls/ListBox.xml @@ -49,10 +49,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example creates a and subscribes to the event. diff --git a/xml/System.Windows.Controls/ListBoxItem.xml b/xml/System.Windows.Controls/ListBoxItem.xml index 80e04f7edc5..aca18d9dd21 100644 --- a/xml/System.Windows.Controls/ListBoxItem.xml +++ b/xml/System.Windows.Controls/ListBoxItem.xml @@ -38,10 +38,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a that contains elements. diff --git a/xml/System.Windows.Controls/ListView.xml b/xml/System.Windows.Controls/ListView.xml index b6816e98bbc..f887f5f33c2 100644 --- a/xml/System.Windows.Controls/ListView.xml +++ b/xml/System.Windows.Controls/ListView.xml @@ -50,10 +50,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a control that implements a as its . The illustration in the Remarks section is taken from this example. diff --git a/xml/System.Windows.Controls/ListViewItem.xml b/xml/System.Windows.Controls/ListViewItem.xml index 138b06f56a4..19ce5186a15 100644 --- a/xml/System.Windows.Controls/ListViewItem.xml +++ b/xml/System.Windows.Controls/ListViewItem.xml @@ -31,8 +31,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ]]> diff --git a/xml/System.Windows.Controls/Menu.xml b/xml/System.Windows.Controls/Menu.xml index 17c73e442de..153432546a0 100644 --- a/xml/System.Windows.Controls/Menu.xml +++ b/xml/System.Windows.Controls/Menu.xml @@ -29,8 +29,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ]]> diff --git a/xml/System.Windows.Controls/MenuItem.xml b/xml/System.Windows.Controls/MenuItem.xml index 7fca2967f49..6c251cf903a 100644 --- a/xml/System.Windows.Controls/MenuItem.xml +++ b/xml/System.Windows.Controls/MenuItem.xml @@ -61,11 +61,8 @@ To apply the same property settings to multiple controls, use the property. You can modify the default to give the control a unique appearance. For more information about creating a , see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). To see the parts and states that are specific to the , see [Menu Styles and Templates](~/docs/framework/wpf/controls/menu-styles-and-templates.md). Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). - -> [!NOTE] -> Setting a visual property only has an effect if that property is both present in the control's default template and is set by using a [TemplateBinding](~/docs/framework/wpf/advanced/templatebinding-markup-extension.md). You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - + +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example creates a to manipulate text in a . The contains objects that use the , , and properties and the , , and events. diff --git a/xml/System.Windows.Controls/PasswordBox.xml b/xml/System.Windows.Controls/PasswordBox.xml index 869df38d648..888aa1afe05 100644 --- a/xml/System.Windows.Controls/PasswordBox.xml +++ b/xml/System.Windows.Controls/PasswordBox.xml @@ -34,10 +34,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in Button control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to specify the handler method for the event. diff --git a/xml/System.Windows.Controls/ProgressBar.xml b/xml/System.Windows.Controls/ProgressBar.xml index 8348d548173..4a9f95702ef 100644 --- a/xml/System.Windows.Controls/ProgressBar.xml +++ b/xml/System.Windows.Controls/ProgressBar.xml @@ -40,10 +40,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples This example creates a and uses an animation to simulate the progress of an operation. diff --git a/xml/System.Windows.Controls/RadioButton.xml b/xml/System.Windows.Controls/RadioButton.xml index c2c8e6a720f..8db40a55341 100644 --- a/xml/System.Windows.Controls/RadioButton.xml +++ b/xml/System.Windows.Controls/RadioButton.xml @@ -36,10 +36,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create controls, group them inside a container, and handle the event. diff --git a/xml/System.Windows.Controls/ScrollViewer.xml b/xml/System.Windows.Controls/ScrollViewer.xml index d0bcc5e2324..4293ba302a7 100644 --- a/xml/System.Windows.Controls/ScrollViewer.xml +++ b/xml/System.Windows.Controls/ScrollViewer.xml @@ -50,10 +50,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example creates a that contains some text and a rectangle. The scroll bars appear only when they are needed. When you resize the window, the scroll bars appear and disappear. diff --git a/xml/System.Windows.Controls/Slider.xml b/xml/System.Windows.Controls/Slider.xml index 2ea917e3c10..20fc0cb48f1 100644 --- a/xml/System.Windows.Controls/Slider.xml +++ b/xml/System.Windows.Controls/Slider.xml @@ -67,10 +67,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following examples shows how to bind the property of a to the of a control. diff --git a/xml/System.Windows.Controls/TabControl.xml b/xml/System.Windows.Controls/TabControl.xml index 0f70995d7d8..7dd3b765218 100644 --- a/xml/System.Windows.Controls/TabControl.xml +++ b/xml/System.Windows.Controls/TabControl.xml @@ -37,10 +37,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example creates a and binds the in the second to a in the first . diff --git a/xml/System.Windows.Controls/TabItem.xml b/xml/System.Windows.Controls/TabItem.xml index e46d039b2a3..3b4d8f60b50 100644 --- a/xml/System.Windows.Controls/TabItem.xml +++ b/xml/System.Windows.Controls/TabItem.xml @@ -32,10 +32,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a with elements. diff --git a/xml/System.Windows.Controls/TextBox.xml b/xml/System.Windows.Controls/TextBox.xml index fc9813f36d2..036eae99df0 100644 --- a/xml/System.Windows.Controls/TextBox.xml +++ b/xml/System.Windows.Controls/TextBox.xml @@ -57,10 +57,7 @@ Example of a TextBox Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples This example shows how to use the Text property to set the initial text contents of a TextBox control. diff --git a/xml/System.Windows.Controls/ToolBar.xml b/xml/System.Windows.Controls/ToolBar.xml index f1345da10d9..fc7e1db2b5c 100644 --- a/xml/System.Windows.Controls/ToolBar.xml +++ b/xml/System.Windows.Controls/ToolBar.xml @@ -37,10 +37,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a inside a . diff --git a/xml/System.Windows.Controls/ToolTip.xml b/xml/System.Windows.Controls/ToolTip.xml index 9ba08b9c9ae..910e8149546 100644 --- a/xml/System.Windows.Controls/ToolTip.xml +++ b/xml/System.Windows.Controls/ToolTip.xml @@ -43,10 +43,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following examples shows how to define a tooltip control for a element. diff --git a/xml/System.Windows.Controls/TreeView.xml b/xml/System.Windows.Controls/TreeView.xml index 0d190b1c3a8..b95f61c96bc 100644 --- a/xml/System.Windows.Controls/TreeView.xml +++ b/xml/System.Windows.Controls/TreeView.xml @@ -46,10 +46,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a . diff --git a/xml/System.Windows.Controls/TreeViewItem.xml b/xml/System.Windows.Controls/TreeViewItem.xml index a76ece77728..621a6879fd8 100644 --- a/xml/System.Windows.Controls/TreeViewItem.xml +++ b/xml/System.Windows.Controls/TreeViewItem.xml @@ -52,10 +52,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a hierarchy of controls in a control. diff --git a/xml/System.Windows.Navigation/NavigationWindow.xml b/xml/System.Windows.Navigation/NavigationWindow.xml index a909ceaa67c..c199b57b5ac 100644 --- a/xml/System.Windows.Navigation/NavigationWindow.xml +++ b/xml/System.Windows.Navigation/NavigationWindow.xml @@ -96,10 +96,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how to create a . diff --git a/xml/System.Windows/Window.xml b/xml/System.Windows/Window.xml index bf827586020..639518f900a 100644 --- a/xml/System.Windows/Window.xml +++ b/xml/System.Windows/Window.xml @@ -76,10 +76,7 @@ Dependency properties for this control might be set by the control's default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see [Default WPF Themes](https://go.microsoft.com/fwlink/?LinkID=158252). -> [!NOTE] -> Setting a visual property will only have an effect if that property is both present in control's default template and is set by using a . You can find a list of visual properties in the "Changing the Visual Structure of a Control" section in [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](~/docs/framework/wpf/controls/customizing-the-appearance-of-an-existing-control.md). - - +[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)] ## Examples The following example shows how a standard window is defined using only markup: