Skip to content

Commit b78a297

Browse files
author
Ron Petrusha
authored
Replaced dropped text on setting visual properties (#1748)
* Replaced dropped text * Update includes/visual-property-note.md Co-Authored-By: rpetrusha <[email protected]>
1 parent 31459d3 commit b78a297

40 files changed

+43
-139
lines changed

includes/visual-property-note.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> [!NOTE]
2+
> 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.
3+

xml/System.Windows.Controls.Primitives/DatePickerTextBox.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
3232
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).
3333
34-
> [!NOTE]
35-
> 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).
34+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
3635
3736
]]></format>
3837
</remarks>

xml/System.Windows.Controls.Primitives/RepeatButton.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@
2929
3030
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).
3131
32-
> [!NOTE]
33-
> 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).
34-
35-
32+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
3633
3734
## Examples
3835
The following example shows how to create a <xref:System.Windows.Controls.Primitives.RepeatButton>.

xml/System.Windows.Controls.Primitives/ScrollBar.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@
5353
5454
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).
5555
56-
> [!NOTE]
57-
> Setting a visual property will only have an effect if that property is both present in <xref:System.Windows.Controls.Primitives.ScrollBar> 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).
58-
59-
56+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
6057
6158
## Examples
6259
The following example shows how to create a horizontal <xref:System.Windows.Controls.Primitives.ScrollBar> that has a range of values between 0 and 100.

xml/System.Windows.Controls.Primitives/StatusBar.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@
4444
4545
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).
4646
47-
> [!NOTE]
48-
> 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).
49-
50-
47+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
5148
5249
## Examples
5350
The following example creates a <xref:System.Windows.Controls.Primitives.StatusBar>.

xml/System.Windows.Controls.Primitives/Thumb.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
4848
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).
4949
50-
> [!NOTE]
51-
> 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).
50+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
5251
5352
]]></format>
5453
</remarks>

xml/System.Windows.Controls.Primitives/ToggleButton.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
3535
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).
3636
37-
> [!NOTE]
38-
> 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).
37+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
3938
4039
]]></format>
4140
</remarks>

xml/System.Windows.Controls/Button.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333
3434
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).
3535
36-
> [!NOTE]
37-
> Setting a visual property will only have an effect if that property is both present in <xref:System.Windows.Controls.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).
38-
39-
36+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
4037
4138
## Examples
4239
The following example shows three buttons that respond to clicks in three different ways.

xml/System.Windows.Controls/Calendar.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@
6666
6767
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).
6868
69-
> [!NOTE]
70-
> Setting a visual property will only have an effect if that property is both present in <xref:System.Windows.Controls.Calendar> 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).
69+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
7170
7271
<a name="xamlObjectElementUsage_Calendar"></a>
7372
## XAML Object Element Usage
@@ -76,8 +75,6 @@
7675
<Calendar .../>
7776
```
7877
79-
80-
8178
## Examples
8279
The following illustration shows two <xref:System.Windows.Controls.Calendar> controls, one with selections and blackout dates and one without.
8380

xml/System.Windows.Controls/CheckBox.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@
3737
3838
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).
3939
40-
> [!NOTE]
41-
> Setting a visual property will only have an effect if that property is both present in <xref:System.Windows.Controls.CheckBox> 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).
42-
43-
40+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
4441
4542
## Examples
4643
The following example creates a <xref:System.Windows.Controls.CheckBox> and handles the <xref:System.Windows.Controls.Primitives.ToggleButton.Checked>, <xref:System.Windows.Controls.Primitives.ToggleButton.Unchecked>, and <xref:System.Windows.Controls.Primitives.ToggleButton.Indeterminate> events.

xml/System.Windows.Controls/ComboBox.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@
6262
6363
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).
6464
65-
> [!NOTE]
66-
> Setting a visual property will only have an effect if that property is both present in <xref:System.Windows.Controls.ComboBox> 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).
67-
68-
65+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
6966
7067
## Examples
7168
The following example creates a <xref:System.Windows.Controls.ComboBox>. The example populates the <xref:System.Windows.Controls.ComboBox> by binding the <xref:System.Windows.Controls.ItemsControl.ItemsSource%2A> property to a collection object of type `VacationSpots`. The example also creates a <xref:System.Windows.Controls.TextBlock> that displays the selected item of the <xref:System.Windows.Controls.ComboBox>.

xml/System.Windows.Controls/ComboBoxItem.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
3737
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).
3838
39-
> [!NOTE]
40-
> Setting a visual property will only have an effect if that property is both present in <xref:System.Windows.Controls.ComboBoxItem> 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).
39+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
4140
4241
]]></format>
4342
</remarks>

xml/System.Windows.Controls/ContextMenu.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@
5252
5353
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).
5454
55-
> [!NOTE]
56-
> Setting a visual property will only have an effect if that property is both present in <xref:System.Windows.Controls.ContextMenu> 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).
57-
58-
55+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
5956
6057
## Examples
6158
The following example creates a <xref:System.Windows.Controls.ContextMenu> that manipulates the text of a <xref:System.Windows.Controls.TextBox>. The example demonstrates how to subscribe to and handle the events of <xref:System.Windows.Controls.MenuItem> objects in a <xref:System.Windows.Controls.ContextMenu>.

xml/System.Windows.Controls/DataGrid.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@
8787
8888
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).
8989
90-
> [!NOTE]
91-
> 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).
90+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
9291
9392
## Common Tasks
9493
The following table provides information about tasks that are typically associated with the <xref:System.Windows.Controls.DataGrid>.

xml/System.Windows.Controls/DatePicker.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@
4747
4848
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).
4949
50-
> [!NOTE]
51-
> 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).
50+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
5251
5352
<a name="xamlObjectElementUsage_DatePicker"></a>
5453
## XAML Object Element Usage

xml/System.Windows.Controls/DocumentViewer.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
3535
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).
3636
37-
> [!NOTE]
38-
> Setting a visual property will only have an effect if that property is both present in <xref:System.Windows.Controls.DocumentViewer> 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).
37+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
3938
4039
]]></format>
4140
</remarks>

xml/System.Windows.Controls/Expander.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@
4444
4545
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).
4646
47-
> [!NOTE]
48-
> Setting a visual property will only have an effect if that property is both present in <xref:System.Windows.Controls.Expander> 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).
49-
50-
47+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
5148
5249
## Examples
5350
The following example shows how to create a simple <xref:System.Windows.Controls.Expander> control.

xml/System.Windows.Controls/Frame.xml

+1-4
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@
104104
105105
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).
106106
107-
> [!NOTE]
108-
> Setting a visual property will only have an effect if that property is both present in <xref:System.Windows.Controls.Frame> 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).
109-
110-
107+
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]
111108
112109
## Examples
113110
The following example shows how to create a simple <xref:System.Windows.Controls.Frame> control and specify initial source content to load from a URI using the <xref:System.Windows.Controls.Frame.Source%2A> property.

0 commit comments

Comments
 (0)