Skip to content

Fix broken links #11328

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 1 commit into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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: 1 addition & 2 deletions includes/visual-property-note.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
> [!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](/dotnet/framework/wpf/advanced/templatebinding-markup-extension). You can find a list of visual properties in the [Changing the Visual Structure of a Control](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control#changing-the-visual-structure-of-a-control) section in the [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control) article.

> Setting a visual property only has an effect if that property is both present in the control's default template and set by using a [TemplateBinding](/dotnet/framework/wpf/advanced/templatebinding-markup-extension).
22 changes: 11 additions & 11 deletions xml/System.Windows.Controls.Primitives/DatePickerTextBox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
<Docs>
<summary>Represents the text input of a <see cref="T:System.Windows.Controls.DatePicker" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Controls.Primitives.DatePickerTextBox> control enables users to type a date directly into a <xref:System.Windows.Controls.DatePicker>.
## Customizing the DatePickerTextBox Control
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.DatePickerTextBox> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.DatePickerTextBox>, see [DatePicker Styles and Templates](/dotnet/framework/wpf/controls/datepicker-styles-and-templates).
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Windows.Controls.Primitives.DatePickerTextBox> control enables users to type a date directly into a <xref:System.Windows.Controls.DatePicker>.

## Customizing the DatePickerTextBox Control
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.DatePickerTextBox> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [How to create a template for a control](/dotnet/desktop/wpf/controls/how-to-create-apply-template). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.DatePickerTextBox>, see [DatePicker Styles and Templates](/dotnet/framework/wpf/controls/datepicker-styles-and-templates).

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.
[!INCLUDE[setting-a-visual-property](~/includes/visual-property-note.md)]

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

]]></format>
</remarks>
</Docs>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Windows.Controls.Primitives/RepeatButton.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
The <xref:System.Windows.Controls.Primitives.RepeatButton> class represents a control that is similar to a <xref:System.Windows.Controls.Button>. However, repeat buttons give you control over when and how the <xref:System.Windows.Controls.Primitives.ButtonBase.Click> event occurs. The <xref:System.Windows.Controls.Primitives.RepeatButton> raises the <xref:System.Windows.Controls.Primitives.ButtonBase.Click> event repeatedly from the time it is pressed until it is released. The <xref:System.Windows.Controls.Primitives.RepeatButton.Delay%2A> property determines when the event begins. You can also control the interval of the repetitions with the <xref:System.Windows.Controls.Primitives.RepeatButton.Interval%2A> property.

## Customizing the RepeatButton Control
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.RepeatButton> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.RepeatButton>, see [RepeatButton Styles and Templates](/dotnet/framework/wpf/controls/repeatbutton-styles-and-templates).
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.RepeatButton> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [How to create a template for a control](/dotnet/desktop/wpf/controls/how-to-create-apply-template). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.RepeatButton>, see [RepeatButton Styles and Templates](/dotnet/framework/wpf/controls/repeatbutton-styles-and-templates).

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.

Expand Down
2 changes: 1 addition & 1 deletion xml/System.Windows.Controls.Primitives/ScrollBar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
To display <xref:System.Windows.UIElement> content inside a box that has scroll bars, use the <xref:System.Windows.Controls.ScrollViewer> control.

## Customizing the ScrollBar Control
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.ScrollBar> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.ScrollBar>, see [ScrollBar Styles and Templates](/dotnet/framework/wpf/controls/scrollbar-styles-and-templates).
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.ScrollBar> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [How to create a template for a control](/dotnet/desktop/wpf/controls/how-to-create-apply-template). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.ScrollBar>, see [ScrollBar Styles and Templates](/dotnet/framework/wpf/controls/scrollbar-styles-and-templates).

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.

Expand Down
2 changes: 1 addition & 1 deletion xml/System.Windows.Controls.Primitives/StatusBar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
![Status bar](~/add/media/ss-ctl-statusbar.GIF "Status bar")

## Customizing the StatusBar Control
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.StatusBar> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.StatusBar>, see [StatusBar Styles and Templates](/dotnet/framework/wpf/controls/statusbar-styles-and-templates).
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.StatusBar> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [How to create a template for a control](/dotnet/desktop/wpf/controls/how-to-create-apply-template). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.StatusBar>, see [StatusBar Styles and Templates](/dotnet/framework/wpf/controls/statusbar-styles-and-templates).

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.

Expand Down
2 changes: 1 addition & 1 deletion xml/System.Windows.Controls.Primitives/Thumb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
![Scrollbar illustration](~/add/media/scrollbar-illustration.JPG "Scrollbar illustration")

## Customizing the Thumb Control
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.Thumb> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.Thumb>, see [Thumb Styles and Templates](/dotnet/framework/wpf/controls/thumb-styles-and-templates).
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.Thumb> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [How to create a template for a control](/dotnet/desktop/wpf/controls/how-to-create-apply-template). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.Thumb>, see [Thumb Styles and Templates](/dotnet/framework/wpf/controls/thumb-styles-and-templates).

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.

Expand Down
2 changes: 1 addition & 1 deletion xml/System.Windows.Controls.Primitives/ToggleButton.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
The <xref:System.Windows.Controls.Primitives.ToggleButton.IsChecked%2A> property specifies the state of the <xref:System.Windows.Controls.Primitives.ToggleButton>. The <xref:System.Windows.Controls.Primitives.ToggleButton.IsThreeState%2A> property specifies whether the <xref:System.Windows.Controls.Primitives.ToggleButton> has two or three states.

## Customizing the ToggleButton Control
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.ToggleButton> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.ToggleButton>, see [ToggleButton Styles and Templates](/dotnet/framework/wpf/controls/togglebutton-styles-and-templates).
To apply the same property settings to multiple <xref:System.Windows.Controls.Primitives.ToggleButton> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [How to create a template for a control](/dotnet/desktop/wpf/controls/how-to-create-apply-template). To see the parts and states that are specific to the <xref:System.Windows.Controls.Primitives.ToggleButton>, see [ToggleButton Styles and Templates](/dotnet/framework/wpf/controls/togglebutton-styles-and-templates).

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.

Expand Down
14 changes: 6 additions & 8 deletions xml/System.Windows.Controls/Button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,18 @@
The <xref:System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonDown%2A> method marks the <xref:System.Windows.UIElement.MouseLeftButtonDown> event as handled. To respond to the <xref:System.Windows.UIElement.MouseLeftButtonDown> event, attach an event handler to the <xref:System.Windows.ContentElement.PreviewMouseLeftButtonDown> event, or call <xref:System.Windows.UIElement.AddHandler%28System.Windows.RoutedEvent%2CSystem.Delegate%2CSystem.Boolean%29> with `handledEventsToo` set to `true`.

## Customizing the Button Control
To apply the same property settings to multiple <xref:System.Windows.Controls.Button> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [Customizing the Appearance of an Existing Control by Creating a ControlTemplate](/dotnet/framework/wpf/controls/customizing-the-appearance-of-an-existing-control). To see the parts and states that are specific to the <xref:System.Windows.Controls.Button>, see [Button Styles and Templates](/dotnet/framework/wpf/controls/button-styles-and-templates).
To apply the same property settings to multiple <xref:System.Windows.Controls.Button> controls, use the <xref:System.Windows.FrameworkElement.Style%2A> property. You can modify the default <xref:System.Windows.Controls.ControlTemplate> to give the control a unique appearance. For more information about creating a <xref:System.Windows.Controls.ControlTemplate>, see [How to create a template for a control](/dotnet/desktop/wpf/controls/how-to-create-apply-template). To see the parts and states that are specific to the <xref:System.Windows.Controls.Button>, see [Button Styles and Templates](/dotnet/framework/wpf/controls/button-styles-and-templates).

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.
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.

[!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.

- Hover: the first button changes colors when the user hovers with the mouse over the button.

- Press: the second button requires that the mouse be pressed while the mouse pointer is over the button.

- Release: the third does not reset the background color of the buttons until the mouse is pressed and released on the button.
- Hover: the first button changes colors when the user hovers with the mouse over the button.
- Press: the second button requires that the mouse be pressed while the mouse pointer is over the button.
- Release: the third does not reset the background color of the buttons until the mouse is pressed and released on the button.

:::code language="xaml" source="~/snippets/csharp/System.Windows.Controls/Button/Overview/Pane1.xaml" id="Snippet1":::

Expand Down Expand Up @@ -250,7 +248,7 @@
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Windows.Controls.Button.IsDefaulted%2A> property is `true` when the <xref:System.Windows.Controls.Button.IsDefault%2A> property is set to `true` and the control that has focus does not accept ENTER as input. For example, in the **Run** dialog box, the **OK** button is the default button. When focus is on the text box, <xref:System.Windows.Controls.Button.IsDefaulted%2A> on the **OK** button is `true` because a user can activate the button by pressing ENTER.
The <xref:System.Windows.Controls.Button.IsDefaulted%2A> property is `true` when the <xref:System.Windows.Controls.Button.IsDefault%2A> property is set to `true` and the control that has focus does not accept ENTER as input. For example, in the **Run** dialog box, the **OK** button is the default button. When focus is on the text box, <xref:System.Windows.Controls.Button.IsDefaulted%2A> on the **OK** button is `true` because a user can activate the button by pressing ENTER.

> [!NOTE]
> If the default button has focus, <xref:System.Windows.Controls.Button.IsDefaulted%2A> is `false`. This is because the <xref:System.Windows.Controls.Primitives.ButtonBase.OnKeyDown%2A> method handles ENTER, and it is not necessary for <xref:System.Windows.Controls.Button.IsDefaulted%2A> to be set to `true`.
Expand Down
Loading