Skip to content
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

14676 wpf docs #4678

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion docs/WPF/features/multiple-views.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Multiple views

Help your users be more productive by letting them view independent parts of your app in separate windows. When you create multiple windows for an app, each window behaves independently. The taskbar shows each window separately. Users can move, resize, show, and hide app windows independently and can switch between app windows as if they were separate apps. Each window operates in its own thread.
Help your users be more productive by letting them view independent parts of your app in separate windows. When you create multiple windows for an app, each window behaves independently. The taskbar shows each window separately. Users can move, resize, show, and hide app windows independently and can switch between app windows as if they were separate apps. Each window operates in its own thread.
2 changes: 1 addition & 1 deletion docs/WPF/features/persist-and-restore.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Persist and restore

Persist And Restore provides a service that makes working with application data simpler. It handles loading, saving, and serializing both files and individual pieces of data in the user's local app data folder.
Persist And Restore provides a service that makes working with application data simpler. It handles loading, saving, and serializing both files and individual pieces of data in the user's local app data folder.
2 changes: 1 addition & 1 deletion docs/WPF/features/theme-selection.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Theme selection

This feature allows you to change your app's theme between Light and Dark.
This feature allows you to change your app's theme between Light and Dark.
2 changes: 1 addition & 1 deletion docs/WPF/frameworks/mvvmbasic.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MVVM Basic

**Notice: MVVM Basic has been superseded by the [MVVM Toolkit](./mvvmtoolkit.md) and will be removed as an option in a future version of Template Studio.**
**Notice: MVVM Basic has been superseded by the [MVVM Toolkit](./mvvmtoolkit.md) and has been removed as an option from Template Studio.**

A guide is available if you want to use the new MVVM Toolkit and are [migrating from MvvmBasic](https://docs.microsoft.com/windows/communitytoolkit/mvvm/migratingfrommvvmbasic?WT.mc_id=WDIT-MVP-5001397).

Expand Down
2 changes: 1 addition & 1 deletion docs/WPF/frameworks/mvvmlight.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MVVM Light

**Notice: MVVM Light is no longer actively developed or maintained and will be removed as an option in a future version of Template Studio.**
**Notice: MVVM Light is no longer actively developed or maintained and has been removed as an option from Template Studio.**

A guide is available if you want to use the new MVVM Toolkit and are [migrating from MvvmLight](https://docs.microsoft.com/windows/communitytoolkit/mvvm/migratingfrommvvmlight?WT.mc_id=WDIT-MVP-5001397).

Expand Down
2 changes: 1 addition & 1 deletion docs/WPF/frameworks/prism.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Prism is a framework for building loosely coupled, maintainable, and testable XA

For more information, visit the [Prism GitHub Page](https://github.com/PrismLibrary/Prism).

Prism also provide a number of [productivity tools](https://prismlibrary.github.io/docs/getting-started/productivity-tools.html) that include snippets, item templates, and tools for working in platforms other than UWP.
Prism also provide a number of [productivity tools](https://prismlibrary.github.io/docs/getting-started/productivity-tools.html) that include snippets, item templates, and tools.
2 changes: 1 addition & 1 deletion docs/WPF/frameworks/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following design patterns are supported in WPF apps.
- [Code Behind](./codebehind.md)
- [Prism](./prism.md)

The following are deprecated but still available.
The following are deprecated and no longer available.

- [MVVM Light](./mvvmlight.md)
- [MVVM Basic](./mvvmbasic.md)
4 changes: 1 addition & 3 deletions docs/WPF/getting-started-endusers.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ The final generated code is the result of a project configuration (project type
| [MVVM Toolkit](./frameworks/mvvmtoolkit.md) | The [CommunityToolkit.Mvvm package](https://aka.ms/mvvmtoolkit) is a modern, fast, and modular MVVM library. It is part of the Windows Community Toolkit. |
| [Code Behind](./frameworks/codebehind.md) | Code is coupled directly with a XAML file using a .xaml.cs extension. If you developed in WinForms and feel comfortable with that style of development, this is a great option for you. |
| [Prism](./frameworks/prism.md) | [Prism](https://github.com/PrismLibrary/Prism) is a framework for building loosely coupled, maintainable, and testable XAML applications. It was originally based on guidance from Microsoft's Patterns and Practices team but is now supported by an open source community. It is designed to help build rich client applications that are flexible and easy to maintain by composing different modules and following design patterns.
| [MVVM Basic](./frameworks/mvvmbasic.md) | MVVM Basic includes the minimum necessary to follow the MVVM pattern. It uses Microsoft.Extensions.Hosting library to handle dependency injection and inversion of control. It is intended for people new to MVVM or who are unable to or do not wish to use a 3rd party framework.<br />**Support for MVVM Basic is deprecated and will be removed in a future version.**|
| [MVVMLight](./frameworks/mvvmlight.md) | The [MVVM Light Toolkit](https://github.com/lbugnion/mvvmlight) is a popular, 3rd party toolkit by Laurent Bugnion, which has the purpose of accelerating the creation and development of MVVM applications. This toolkit puts a special emphasis on the "blend ability" of the created application (the ability to open and edit the user interface into Blend), including the creation of design-time data to enable Blend users to "see something" when they work with data controls.<br />As a toolkit, it provides a number of tools and features but there is no requirement to use all of them. This toolkit is popular with developers who want use parts of it to take care of the basics but still allow them to structure the code in their own way.<br />**Support for MVVM Light is deprecated and will be removed in a future version.**|

### Pages

Expand Down Expand Up @@ -90,4 +88,4 @@ The final generated code is the result of a project configuration (project type

- [MahApps.Metro](./mahapps-metro.md)
- [Adapt the app for specific platforms](./platform-specific-recommendations.md)
- [All docs](../readme.md)
- [All docs](../readme.md)
2 changes: 1 addition & 1 deletion docs/WPF/mahapps-metro.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ MahApps.Metro is a project that Paul Jenkins started back in 2011 as a simple wa

The generated projects includes the MahApps.Metro [nuget package](https://www.nuget.org/packages/MahApps.Metro/), it also adds a new [license](https://github.com/MahApps/MahApps.Metro/blob/master/LICENSE) in the project.

For more info about how to work with MahApps.Metro and WPF see [MahApps.Metro GitHub repository](https://github.com/MahApps/MahApps.Metro).
For more info about how to work with MahApps.Metro and WPF see [MahApps.Metro GitHub repository](https://github.com/MahApps/MahApps.Metro).
2 changes: 1 addition & 1 deletion docs/WPF/pages/blank.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Blank page

This is the most basic page. A blank canvas to mold into whatever you wish. The blank page leaves pretty much everything up to you.
This is the most basic page. A blank canvas to mold into whatever you wish. The blank page leaves pretty much everything up to you.
4 changes: 2 additions & 2 deletions docs/WPF/pages/contentgrid.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Content Grid
# Content Grid page

This page allows you to add custom content in a to a content grid based on a ListView control. Clicking on an item shows a detail page.
This page allows you to add custom content in a to a content grid based on a ListView control. Clicking on an item shows a detail page.
2 changes: 1 addition & 1 deletion docs/WPF/pages/datagrid.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# DataGrid
# DataGrid page

A page displaying a DataGrid, this control presents data in a customizable table of rows and columns.
2 changes: 1 addition & 1 deletion docs/WPF/pages/listdetails.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# List Details page

The list-details page has a list pane and a details pane for content. When an item in the list is selected, the details pane is updated. This pattern is frequently used for email and address books.
The list-details page has a list pane and a details pane for content. When an item in the list is selected, the details pane is updated. This pattern is frequently used for email and address books.
2 changes: 1 addition & 1 deletion docs/WPF/pages/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ The following pages are supported in WPF apps.
- [List/Details](./listdetails.md)
- [Data Grid](./datagrid.md)
- [Content Grid](./contentgrid.md)
- [XAML Island](./xamlisland.md)
- [XAML Island](./xamlisland.md)
2 changes: 1 addition & 1 deletion docs/WPF/pages/settings.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Settings page

The settings page is the page where we recommend putting the configuration settings for your application such as setting a dark / light theme. This could also include any licenses, version number and your privacy terms.
The settings page is the page where we recommend putting the configuration settings for your application such as setting a dark / light theme. This could also include any licenses, version number and your privacy terms.
2 changes: 1 addition & 1 deletion docs/WPF/pages/webview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ The web view page embeds a view into your app that renders web content using the

[Is the Web view control right for you?](https://docs.microsoft.com/windows/communitytoolkit/controls/wpf-winforms/webview)

View `Microsoft.Toolkit.Wpf.UI.Controls.WebView` license [here](https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/main/License.md).
View `Microsoft.Toolkit.Wpf.UI.Controls.WebView` license [here](https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/main/License.md).
9 changes: 5 additions & 4 deletions docs/WPF/pages/xamlisland.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# XAML Island page

This page includes a CustomUserControl using a **WindowsXamlHost** control from the **Windows Community Toolkit** to host a UWP control.

This page adds two projects to the solution:

- A **UWP library** that will hosts the UWP Control that will be rendered in the WPF app.

- A **UWP app project** that is necessary to host UWP controls with XAML Island and will never be displayed.
- A **UWP library** that will hosts the UWP Control that will be rendered in the WPF app.
- A **UWP app project** that is necessary to host UWP controls with XAML Island and will never be displayed.

You can read more about [hosting a custom UWP control in a WPF app using XAML Islands](https://docs.microsoft.com/windows/apps/desktop/modernize/host-custom-control-with-xaml-islands).
You can read more about [hosting a custom UWP control in a WPF app using XAML Islands](https://docs.microsoft.com/windows/apps/desktop/modernize/host-custom-control-with-xaml-islands).
3 changes: 1 addition & 2 deletions docs/WPF/platform-specific-recommendations.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ You will need to install [Visual Studio 2019](https://visualstudio.microsoft.com

### Learning

- [Channel 9 serie of videos for Desktop and .NET Core](https://channel9.msdn.com/Series/Desktop-and-NET-Core-101)

- [Channel 9 series of videos for Desktop and .NET Core](https://channel9.msdn.com/Series/Desktop-and-NET-Core-101)
2 changes: 1 addition & 1 deletion docs/WPF/projectTypes/blank.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

This basic WPF project is a blank canvas upon which to build your app. It provides no scaffolding and leaves everything up to you.

Blank projects use [MahApps.Metro](../mahapps-metro.md) to add modern styles to the user interface.
Blank projects use [MahApps.Metro](../mahapps-metro.md) to add modern styles to the user interface.
4 changes: 1 addition & 3 deletions docs/WPF/projectTypes/menubar.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,4 @@ The following code snippets show how to add a new menu "Help" with a menu entry
<!-- End of block -->
```



Menu bar projects use [MahApps.Metro](../mahapps-metro.md) to add modern styles to the user interface.
Menu bar projects use [MahApps.Metro](../mahapps-metro.md) to add modern styles to the user interface.
2 changes: 1 addition & 1 deletion docs/WPF/projectTypes/navigationpane.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ public ObservableCollection<HamburgerMenuItem> MenuItems { get; } = new Observab

The text for a shell HamburgerMenuGlyphItem comes from the localized string resources. For each page item, i.e. `MainPage` Strings/Resources.resx has a value `ShellMainPage`. Change the value in the resources file to alter what is displayed in the HamburgerMenu.

Navigation pane projects use [MahApps.Metro](../mahapps-metro.md) to add modern styles to the user interface.
Navigation pane projects use [MahApps.Metro](../mahapps-metro.md) to add modern styles to the user interface.
3 changes: 1 addition & 2 deletions docs/WPF/projectTypes/ribbon.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ribbon project type

Adds a ribbon control from `Fluent.Ribbon` nuget package which consists of several tabs, grouped by functionality to represent the menu actions of an application. For more info on `Fluent.Ribbon` see https://fluentribbon.github.io/.
Adds a ribbon control from `Fluent.Ribbon` nuget package which consists of several tabs, grouped by functionality to represent the menu actions of an application. For more info on `Fluent.Ribbon` see <https://fluentribbon.github.io/>.

The Ribbon control is placed on the `ShellWindow` and the DataContext of this Ribbon control is the `ShellViewModel`, but most of times, the ribbon tabs should be configured from active pages, to solve this Ribbon projects has infrastructure to add Ribbon tabs from pages and also add Groups to the main tab in the Ribbon control.

Expand Down Expand Up @@ -85,7 +85,6 @@ public ListDetailsPage(ListDetailsViewModel viewModel)

![Screenshot of app with ribbon tabs from a ListDetails page](../resources/modifications/RibbonTabsFromPage.png)


## Add Ribbon Home Tab groups from a page

We should add a `RibbonPageConfiguration` in `ListDetailsPage.xaml`, see comments in line.
Expand Down
2 changes: 0 additions & 2 deletions docs/WPF/services/identity.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Once the user has been authenticated, the app will call the Microsoft Graph to r

You can choose between different ways to initialize the IdentityService, restricting hereby the allowed account types.


1. InitializeWithAadAndPersonalMsAccounts() **(Default)** - allows Azure Active Directory Accounts and Personal Microsoft Accounts
2. InitializeWithPersonalMsAccounts() - allows Personal Microsoft Accounts
3. InitializeWithAadMultipleOrgs() - allows Azure Active Directory Accounts from any organization
Expand Down Expand Up @@ -74,7 +73,6 @@ In Forced Login apps unauthorized users cannot log into the app, in Optional Log

This class is responsible for obtaining the AccessToken from the cache or via Windows Integrated or Interactive Auth. The class uses the MSAL NuGet library to connect with Azure Active Directory. The Identity service is initialized with a ClientID configured in the appsettings.json. If you haven't done already create a ClientID following the steps on https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app and update the appsettings.json IdentityClientId.


### MicrosoftGraphService (Core project)

This class calls the Microsoft Graph to obtain the user information and the user photo. It can be extended adding methods that get info from other Microsoft Graph services.
Expand Down
1 change: 0 additions & 1 deletion docs/WPF/services/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ The following services are supported in WPF apps.

- [Forced Login](./forced-login.md)
- [Optional Login](./optional-login.md)

2 changes: 1 addition & 1 deletion docs/WPF/testing/app-mstest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ MSTest is Microsoft's suite of unit testing tools. The unit testing framework is

Including this feature adds a new project to the solution that is set up for hosting Unit tests of the code in the main app.

[Learn more about using the MSTest framework in unit tests.](https://docs.microsoft.com/visualstudio/test/using-microsoft-visualstudio-testtools-unittesting-members-in-unit-tests?view=vs-2019)
[Learn more about using the MSTest framework in unit tests.](https://docs.microsoft.com/visualstudio/test/using-microsoft-visualstudio-testtools-unittesting-members-in-unit-tests?view=vs-2019)
2 changes: 1 addition & 1 deletion docs/WPF/testing/app-nunit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ NUnit is a unit-testing framework for all .Net languages. Initially ported from

Including this feature adds a new project to the solution that is set up for hosting Unit tests of the code in the Core library.

[Learn more about using NUnit.](https://github.com/nunit/docs/wiki/NUnit-Documentation)
[Learn more about using NUnit.](https://github.com/nunit/docs/wiki/NUnit-Documentation)
2 changes: 1 addition & 1 deletion docs/WPF/testing/win-app-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Windows Application Driver is a service to support Selenium-like UI Test Automat

Including this feature adds a new project to the solution that is set up for hosting UI tests of your WPF app that are powered by WinAppDriver.

[Learn more about the Windows Application Driver and creating tests with it.](https://github.com/Microsoft/WinAppDriver)
[Learn more about the Windows Application Driver and creating tests with it.](https://github.com/Microsoft/WinAppDriver)
2 changes: 1 addition & 1 deletion docs/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Here we provide a checklist you can use to ensure that your pull request meets the accessibility requirements.

For more info, read:
- [Accessibility overview](https://docs.microsoft.com/windows/apps/design/accessibility/accessibility-overview)
- [Accessibility overview](https://docs.microsoft.com/windows/apps/design/accessibility/accessibility-overview)
- [Accessibility checklist](https://docs.microsoft.com/windows/apps/design/accessibility/accessibility-checklist)
- [WPF Accessibility best practices](https://docs.microsoft.com/dotnet/framework/ui-automation/accessibility-best-practices)

Expand Down