Skip to content

Replaced dropped text on setting visual properties #1748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 1, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions includes/visual-property-note.md
Original file line number Diff line number Diff line change
@@ -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" 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#changing-the-visual-structure-of-a-control).

3 changes: 1 addition & 2 deletions xml/System.Windows.Controls.Primitives/DatePickerTextBox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

]]></format>
</remarks>
Expand Down
5 changes: 1 addition & 4 deletions xml/System.Windows.Controls.Primitives/RepeatButton.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <xref:System.Windows.Controls.Primitives.RepeatButton>.
Expand Down
5 changes: 1 addition & 4 deletions xml/System.Windows.Controls.Primitives/ScrollBar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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).


[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]

## Examples
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.
Expand Down
5 changes: 1 addition & 4 deletions xml/System.Windows.Controls.Primitives/StatusBar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <xref:System.Windows.Controls.Primitives.StatusBar>.
Expand Down
3 changes: 1 addition & 2 deletions xml/System.Windows.Controls.Primitives/Thumb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

]]></format>
</remarks>
Expand Down
3 changes: 1 addition & 2 deletions xml/System.Windows.Controls.Primitives/ToggleButton.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

]]></format>
</remarks>
Expand Down
5 changes: 1 addition & 4 deletions xml/System.Windows.Controls/Button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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).


[!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.
Expand Down
5 changes: 1 addition & 4 deletions xml/System.Windows.Controls/Calendar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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).
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]

<a name="xamlObjectElementUsage_Calendar"></a>
## XAML Object Element Usage
Expand All @@ -76,8 +75,6 @@
<Calendar .../>
```



## Examples
The following illustration shows two <xref:System.Windows.Controls.Calendar> controls, one with selections and blackout dates and one without.

Expand Down
5 changes: 1 addition & 4 deletions xml/System.Windows.Controls/CheckBox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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).


[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]

## Examples
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.
Expand Down
5 changes: 1 addition & 4 deletions xml/System.Windows.Controls/ComboBox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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).


[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]

## Examples
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>.
Expand Down
3 changes: 1 addition & 2 deletions xml/System.Windows.Controls/ComboBoxItem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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).
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]

]]></format>
</remarks>
Expand Down
5 changes: 1 addition & 4 deletions xml/System.Windows.Controls/ContextMenu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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).


[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]

## Examples
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>.
Expand Down
3 changes: 1 addition & 2 deletions xml/System.Windows.Controls/DataGrid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <xref:System.Windows.Controls.DataGrid>.
Expand Down
3 changes: 1 addition & 2 deletions xml/System.Windows.Controls/DatePicker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

<a name="xamlObjectElementUsage_DatePicker"></a>
## XAML Object Element Usage
Expand Down
3 changes: 1 addition & 2 deletions xml/System.Windows.Controls/DocumentViewer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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).
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]

]]></format>
</remarks>
Expand Down
5 changes: 1 addition & 4 deletions xml/System.Windows.Controls/Expander.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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).


[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]

## Examples
The following example shows how to create a simple <xref:System.Windows.Controls.Expander> control.
Expand Down
5 changes: 1 addition & 4 deletions xml/System.Windows.Controls/Frame.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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).


[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]

## Examples
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.
Expand Down
Loading