diff --git a/.acrolinx-config.edn b/.acrolinx-config.edn index ae00068..2bad3d2 100644 --- a/.acrolinx-config.edn +++ b/.acrolinx-config.edn @@ -1,2 +1,2 @@ -{:allowed-branchname-matches ["^master$" "^release..*"] +{:allowed-branchname-matches ["^main$" "^release..*"] :allowed-filename-matches ["^..*"]} diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index 9594c2d..3dd30f3 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -2,7 +2,6 @@ name: Snippets 5000 # Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch on: pull_request: paths: diff --git a/.github/workflows/version-sweep.yml b/.github/workflows/version-sweep.yml index 69881f4..6354768 100644 --- a/.github/workflows/version-sweep.yml +++ b/.github/workflows/version-sweep.yml @@ -4,7 +4,7 @@ name: 'target supported version' # Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the master branch + # Triggers the workflow on push or pull request event based on a schedule schedule: - cron: '0 0 1 * *' workflow_dispatch: diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 08a5758..95997af 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -29,7 +29,7 @@ "skip_source_output_uploading": false, "need_preview_pull_request": true, "need_pr_comments": false, - "git_repository_branch_open_to_public_contributors": "master", + "git_repository_branch_open_to_public_contributors": "main", "contribution_branch_mappings": {}, "dependent_repositories": [ { @@ -61,4 +61,4 @@ "docs_build_engine": { "name": "docfx_v3" } -} \ No newline at end of file +} diff --git a/dotnet-desktop-guide/framework/wpf/advanced/how-to-create-outlined-text.md b/dotnet-desktop-guide/framework/wpf/advanced/how-to-create-outlined-text.md index def94c8..80fc647 100644 --- a/dotnet-desktop-guide/framework/wpf/advanced/how-to-create-outlined-text.md +++ b/dotnet-desktop-guide/framework/wpf/advanced/how-to-create-outlined-text.md @@ -47,7 +47,7 @@ In most cases, when you're adding ornamentation to text strings in your [!INCLUD [!code-csharp[OutlineTextControlViewer#OnRender](~/samples/snippets/csharp/VS_Snippets_Wpf/OutlineTextControlViewer/CSharp/OutlineTextControl.cs#onrender)] [!code-vb[OutlineTextControlViewer#OnRender](~/samples/snippets/visualbasic/VS_Snippets_Wpf/OutlineTextControlViewer/visualbasic/outlinetextcontrol.vb#onrender)] - For the source of the example custom user control object, see [OutlineTextControl.cs for C#](https://github.com/dotnet/docs/tree/master/samples/snippets/csharp/VS_Snippets_Wpf/OutlineTextControlViewer/CSharp/OutlineTextControl.cs) and [OutlineTextControl.vb for Visual Basic](https://github.com/dotnet/docs/blob/master/samples/snippets/visualbasic/VS_Snippets_Wpf/OutlineTextControlViewer/visualbasic/outlinetextcontrol.vb). + For the source of the example custom user control object, see [OutlineTextControl.cs for C#](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/OutlineTextControlViewer/CSharp/OutlineTextControl.cs) and [OutlineTextControl.vb for Visual Basic](https://github.com/dotnet/docs/blob/master/samples/snippets/visualbasic/VS_Snippets_Wpf/OutlineTextControlViewer/visualbasic/outlinetextcontrol.vb). ## See also diff --git a/dotnet-desktop-guide/framework/wpf/controls/control-authoring-overview.md b/dotnet-desktop-guide/framework/wpf/controls/control-authoring-overview.md index f72f44e..293b18a 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/control-authoring-overview.md +++ b/dotnet-desktop-guide/framework/wpf/controls/control-authoring-overview.md @@ -260,7 +260,7 @@ Resources that are specific to a theme are kept in a resource dictionary with a You do not need to define a resource for every theme. If a resource is not defined for a specific theme, then the control checks `Classic.xaml` for the resource. If the resource is not defined in the file that corresponds to the current theme or in `Classic.xaml`, the control uses the generic resource, which is in a resource dictionary file named `generic.xaml`. The `generic.xaml` file is located in the same folder as the theme-specific resource dictionary files. Although `generic.xaml` does not correspond to a specific Windows theme, it is still a theme-level dictionary. -The [C#](https://github.com/dotnet/docs/tree/master/samples/snippets/csharp/VS_Snippets_Wpf/CustomControlNumericUpDown/CSharp) or [Visual Basic](https://github.com/dotnet/docs/tree/master/samples/snippets/visualbasic/VS_Snippets_Wpf/CustomControlNumericUpDown/visualbasic) NumericUpDown custom control with theme and UI automation support sample contains two resource dictionaries for the `NumericUpDown` control: one is in generic.xaml, and the other is in Luna.NormalColor.xaml. +The [C#](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/CustomControlNumericUpDown/CSharp) or [Visual Basic](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/CustomControlNumericUpDown/visualbasic) NumericUpDown custom control with theme and UI automation support sample contains two resource dictionaries for the `NumericUpDown` control: one is in generic.xaml, and the other is in Luna.NormalColor.xaml. When you put a in any of the theme-specific resource dictionary files, you must create a static constructor for your control and call the method on the , as shown in the following example. diff --git a/dotnet-desktop-guide/framework/wpf/controls/how-to-create-a-custom-view-mode-for-a-listview.md b/dotnet-desktop-guide/framework/wpf/controls/how-to-create-a-custom-view-mode-for-a-listview.md index 5f33f11..6984943 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/how-to-create-a-custom-view-mode-for-a-listview.md +++ b/dotnet-desktop-guide/framework/wpf/controls/how-to-create-a-custom-view-mode-for-a-listview.md @@ -35,7 +35,7 @@ This example shows how to create a custom control displays content in a ## See also -- [Popup Placement Sample](https://github.com/dotnet/docs/tree/master/samples/snippets/csharp/VS_Snippets_Wpf/PopupPositionSnippet/CS) +- [Popup Placement Sample](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/PopupPositionSnippet/CS) diff --git a/dotnet-desktop-guide/framework/wpf/controls/ui-automation-of-a-wpf-custom-control.md b/dotnet-desktop-guide/framework/wpf/controls/ui-automation-of-a-wpf-custom-control.md index e253a08..23fe5d6 100644 --- a/dotnet-desktop-guide/framework/wpf/controls/ui-automation-of-a-wpf-custom-control.md +++ b/dotnet-desktop-guide/framework/wpf/controls/ui-automation-of-a-wpf-custom-control.md @@ -139,7 +139,7 @@ Public Class RangePeer2 End Class ``` -For an example implementation, see the [C#](https://github.com/dotnet/docs/tree/master/samples/snippets/csharp/VS_Snippets_Wpf/CustomControlNumericUpDown/CSharp) or [Visual Basic](https://github.com/dotnet/docs/tree/master/samples/snippets/visualbasic/VS_Snippets_Wpf/CustomControlNumericUpDown/visualbasic) source code that implements and consumes a NumericUpDown custom control. +For an example implementation, see the [C#](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/CustomControlNumericUpDown/CSharp) or [Visual Basic](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/CustomControlNumericUpDown/visualbasic) source code that implements and consumes a NumericUpDown custom control. ### Raise Events Automation clients can subscribe to automation events. Custom controls must report changes to control state by calling the method. Similarly, when a property value changes, call the method. The following code shows how to get the peer object from within the control code and call a method to raise an event. As an optimization, the code determines if there are any listeners for this event type. Raising the event only when there are listeners avoids unnecessary overhead and helps the control remain responsive. @@ -151,5 +151,5 @@ For an example implementation, see the [C#](https://github.com/dotnet/docs/tree/ - [UI Automation Overview](/dotnet/framework/ui-automation/ui-automation-overview) - [Server-Side UI Automation Provider Implementation](/dotnet/framework/ui-automation/server-side-ui-automation-provider-implementation) -- [NumericUpDown custom control (C#) on GitHub](https://github.com/dotnet/docs/tree/master/samples/snippets/csharp/VS_Snippets_Wpf/CustomControlNumericUpDown/CSharp) -- [NumericUpDown custom control (Visual Basic) on GitHub](https://github.com/dotnet/docs/tree/master/samples/snippets/visualbasic/VS_Snippets_Wpf/CustomControlNumericUpDown/visualbasic) +- [NumericUpDown custom control (C#) on GitHub](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/CustomControlNumericUpDown/CSharp) +- [NumericUpDown custom control (Visual Basic) on GitHub](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/CustomControlNumericUpDown/visualbasic) diff --git a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-accelerate-or-decelerate-an-animation.md b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-accelerate-or-decelerate-an-animation.md index eee0a9d..4c0e2e1 100644 --- a/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-accelerate-or-decelerate-an-animation.md +++ b/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-accelerate-or-decelerate-an-animation.md @@ -15,4 +15,4 @@ This example demonstrates how to make an animation accelerate and decelerate ove ## Example [!code-xaml[timingbehaviors_snip#1](~/samples/snippets/csharp/VS_Snippets_Wpf/timingbehaviors_snip/CSharp/AccelDecelExample.xaml#1)] - Code has been omitted from this example. For the complete code, see the [Animation Timing Behavior (C#)](https://github.com/dotnet/docs/tree/master/samples/snippets/csharp/VS_Snippets_Wpf/timingbehaviors_procedural_snip/CSharp) or [Animation Timing Behavior (Visual Basic)](https://github.com/dotnet/docs/tree/master/samples/snippets/visualbasic/VS_Snippets_Wpf/timingbehaviors_procedural_snip/visualbasic). + Code has been omitted from this example. For the complete code, see the [Animation Timing Behavior (C#)](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/csharp/VS_Snippets_Wpf/timingbehaviors_procedural_snip/CSharp) or [Animation Timing Behavior (Visual Basic)](https://github.com/dotnet/docs-desktop/tree/main/dotnet-desktop-guide/samples/snippets/visualbasic/VS_Snippets_Wpf/timingbehaviors_procedural_snip/visualbasic). diff --git a/dotnet-desktop-guide/net/wpf/migration/convert-project-from-net-framework.md b/dotnet-desktop-guide/net/wpf/migration/convert-project-from-net-framework.md index b4b1ab4..b61f091 100644 --- a/dotnet-desktop-guide/net/wpf/migration/convert-project-from-net-framework.md +++ b/dotnet-desktop-guide/net/wpf/migration/convert-project-from-net-framework.md @@ -9,7 +9,7 @@ ms.topic: how-to # Migrating WPF apps to .NET Core -This article covers the steps necessary to migrate a Windows Presentation Foundation (WPF) app from .NET Framework to .NET Core 3.0. If you don't have a WPF app on hand to port, but would like to try out the process, you can use the **Bean Trader** sample app available on [GitHub](https://github.com/dotnet/windows-desktop/tree/master/Samples/BeanTrader). The original app (targeting .NET Framework 4.7.2) is available in the NetFx\BeanTraderClient folder. First we'll explain the steps necessary to port apps in general, and then we'll walk through the specific changes that apply to the **Bean Trader** sample. +This article covers the steps necessary to migrate a Windows Presentation Foundation (WPF) app from .NET Framework to .NET Core 3.0. If you don't have a WPF app on hand to port, but would like to try out the process, you can use the **Bean Trader** sample app available on [GitHub](https://github.com/dotnet/windows-desktop/tree/main/Samples/BeanTrader). The original app (targeting .NET Framework 4.7.2) is available in the NetFx\BeanTraderClient folder. First we'll explain the steps necessary to port apps in general, and then we'll walk through the specific changes that apply to the **Bean Trader** sample. [!INCLUDE [desktop guide under construction](../../includes/desktop-guide-preview-note.md)] @@ -41,7 +41,7 @@ To migrate to .NET Core, you must first: ## About the sample -This article references the [Bean Trader sample app](https://github.com/dotnet/windows-desktop/tree/master/Samples/BeanTrader) because it uses a variety of dependencies similar to those that real-world WPF apps might have. The app isn't large, but is meant to be a step up from 'Hello World' in terms of complexity. The app demonstrates some issues users may encounter while porting real apps. The app communicates with a WCF service, so for it to run properly, you'll also need to run the BeanTraderServer project (available in the same GitHub repository) and make sure the BeanTraderClient configuration points to the correct endpoint. (By default, the sample assumes the server is running on the same machine at `http://localhost:8090`, which will be true if you launch BeanTraderServer locally.) +This article references the [Bean Trader sample app](https://github.com/dotnet/windows-desktop/tree/main/Samples/BeanTrader) because it uses a variety of dependencies similar to those that real-world WPF apps might have. The app isn't large, but is meant to be a step up from 'Hello World' in terms of complexity. The app demonstrates some issues users may encounter while porting real apps. The app communicates with a WCF service, so for it to run properly, you'll also need to run the BeanTraderServer project (available in the same GitHub repository) and make sure the BeanTraderClient configuration points to the correct endpoint. (By default, the sample assumes the server is running on the same machine at `http://localhost:8090`, which will be true if you launch BeanTraderServer locally.) Keep in mind that this sample app is meant to demonstrate .NET Core porting challenges and solutions. It's not meant to demonstrate WPF best practices. In fact, it deliberately includes some anti-patterns to make sure you come across at least a couple of interesting challenges while porting.