diff --git a/hub/apps/develop/data-access/sql-server-database.md b/hub/apps/develop/data-access/sql-server-database.md index 11faa03d1e..bce85ebf1c 100644 --- a/hub/apps/develop/data-access/sql-server-database.md +++ b/hub/apps/develop/data-access/sql-server-database.md @@ -203,7 +203,7 @@ This XAML creates a [ListView](/windows/windows-app-sdk/api/winrt/microsoft.ui.x ### Show products in the ListView -Open the **MainWindow.xaml.cs** file, and add code to the constructor of the `MainWindow` class that sets the **ItemSource** property of the [ListView](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.listview) to the [ObservableCollection](/dotnet/api/system.collections.objectmodel.observablecollection-1) of `Product` instances. +Open the **MainWindow.xaml.cs** file, and add code to the constructor of the `MainWindow` class that sets the **ItemsSource** property of the [ListView](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.listview) to the [ObservableCollection](/dotnet/api/system.collections.objectmodel.observablecollection-1) of `Product` instances. ```csharp public MainWindow() diff --git a/hub/apps/develop/data-access/sqlite-data-access.md b/hub/apps/develop/data-access/sqlite-data-access.md index fe662de6b0..0d5f7d8139 100644 --- a/hub/apps/develop/data-access/sqlite-data-access.md +++ b/hub/apps/develop/data-access/sqlite-data-access.md @@ -163,7 +163,7 @@ public async static void InitializeDatabase() This code creates the SQLite database and stores it in the application's local data store. -In this example, we name the database `sqlliteSample.db` but you can use whatever name you want as long as you use that name in all [SqliteConnection](/dotnet/api/microsoft.data.sqlite.sqliteconnection) objects that you instantiate. In a production application, connection information such as the database filename should be stored in app configuration rather than hard-coded (see [**Adding Azure App Configuration by using Visual Studio Connected Services**](/visualstudio/azure/vs-azure-tools-connected-services-app-configuration)). +In this example, we name the database `sqliteSample.db` but you can use whatever name you want as long as you use that name in all [SqliteConnection](/dotnet/api/microsoft.data.sqlite.sqliteconnection) objects that you instantiate. In a production application, connection information such as the database filename should be stored in app configuration rather than hard-coded (see [**Adding Azure App Configuration by using Visual Studio Connected Services**](/visualstudio/azure/vs-azure-tools-connected-services-app-configuration)). In the constructor of the **App.xaml.cs** file of your project, call the `InitializeDatabase` method of the `DataAccess` class. This will ensure that the database is created or opened each time the app starts. diff --git a/hub/apps/develop/platform/xaml/3-d-perspective-effects.md b/hub/apps/develop/platform/xaml/3-d-perspective-effects.md index 213d2c6bfa..28964b7c56 100644 --- a/hub/apps/develop/platform/xaml/3-d-perspective-effects.md +++ b/hub/apps/develop/platform/xaml/3-d-perspective-effects.md @@ -124,7 +124,7 @@ Notice how the image rotates around the center when the [**CenterOfRotationY**]( ```xml - + ``` diff --git a/hub/apps/develop/testing/index.md b/hub/apps/develop/testing/index.md index 2fa8694ac2..4addecbbe9 100644 --- a/hub/apps/develop/testing/index.md +++ b/hub/apps/develop/testing/index.md @@ -127,7 +127,7 @@ namespace WinUITest1 ```csharp namespace WinUICLassLibrary1 { - public sealed partial class UserControll : UserControl + public sealed partial class UserControl1 : UserControl { public UserControl1() { diff --git a/hub/apps/develop/ui/controls/listview-filtering.md b/hub/apps/develop/ui/controls/listview-filtering.md index 7d4ba29390..a45b72db5d 100644 --- a/hub/apps/develop/ui/controls/listview-filtering.md +++ b/hub/apps/develop/ui/controls/listview-filtering.md @@ -51,7 +51,7 @@ For filtering to work, the ListView must have a data source that can be manipula To start, you'll need to initialize your original data source in a separate collection, such as a [List\](/dotnet/api/system.collections.generic.list-1). In this example, you have a `List` called `allContacts` that holds all of the `Contact` objects that can potentially be shown in the ListView. -You'll also need a collection to hold the filtered data, which will constantly change every time a filter is applied. For this, you'll use an [ObservableCollection\](/dotnet/api/system.collections.objectmodel.observablecollection-1) so that the ListView is notified to update whenever the collection changes. In this example, it's an `ObservableCollection` called `contactsFiltered`, and is the [ItemsSource](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.itemscontrol.itemssource) for the ListView. At initialization, it will have the same contents as `allContacts`. +You'll also need a collection to hold the filtered data, which will constantly change every time a filter is applied. For this, you'll use an [ObservableCollection\](/dotnet/api/system.collections.objectmodel.observablecollection-1) so that the ListView is notified to update whenever the collection changes. In this example, it's an `ObservableCollection` called `contactsFiltered`, and is the [ItemsSource](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.itemscontrol.itemssource) for the ListView. At initialization, it will have the same contents as `allContacts`. The filtering operation is performed through these steps, shown in the following code: @@ -87,7 +87,7 @@ public sealed partial class MainPage : Page // contactsFiltered). Set this newly populated collection as the // ItemsSource for the ListView. contactsFiltered = new ObservableCollection(allContacts); - Filtereditemscontrol.itemssource = contactsFiltered; + FilteredListView.ItemsSource = contactsFiltered; } // Whenever text changes in the filtering text box, this function is called: diff --git a/hub/apps/develop/windows-integration/integrate-sharesheet-pwa.md b/hub/apps/develop/windows-integration/integrate-sharesheet-pwa.md index 7ad62c34f3..7358232861 100644 --- a/hub/apps/develop/windows-integration/integrate-sharesheet-pwa.md +++ b/hub/apps/develop/windows-integration/integrate-sharesheet-pwa.md @@ -42,7 +42,7 @@ The `share_target` member must contain the necessary information for the system }, ``` -When your app is selected by the user as the target for shared content, the PWA is launched. A `GET` HTTP request is made to the URL specified by the `action` property. The shared data is passed as the `title`, `text`, and `url` query parameters. The following request is made: `/handle-shared-content/?title=shared title&text=shared text&url=shared url`. +When your app is selected by the user as the target for shared content, the PWA is launched. A `POST` HTTP request is made to the URL specified by the `action` property. The shared data is posted to that URL when the share target is invoked. The following example illustrates how to register the scoped service worker: diff --git a/hub/apps/windows-app-sdk/applifecycle/background-tasks.md b/hub/apps/windows-app-sdk/applifecycle/background-tasks.md index 5aaadc4db4..fb31960340 100644 --- a/hub/apps/windows-app-sdk/applifecycle/background-tasks.md +++ b/hub/apps/windows-app-sdk/applifecycle/background-tasks.md @@ -57,7 +57,7 @@ catch (...) } ``` -The following example shows how to register a background task using C#. In the Windows App SDK github sample, you can see this registration code in [MainWindow.Xaml.cpp](https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/Samples/BackgroundTask/InProc%20BackgroundTask/cs-winui/BackgroundTaskBuilder/MainWindow.xaml.cs#L79). +The following example shows how to register a background task using C#. In the Windows App SDK github sample, you can see this registration code in [MainWindow.xaml.cs](https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/Samples/BackgroundTask/InProc%20BackgroundTask/cs-winui/BackgroundTaskBuilder/MainWindow.xaml.cs#L79). ```csharp await BackgroundExecutionManager.RequestAccessAsync(); diff --git a/hub/apps/windows-app-sdk/applifecycle/focus-session.md b/hub/apps/windows-app-sdk/applifecycle/focus-session.md index 4edbc31e95..d20f29ff34 100644 --- a/hub/apps/windows-app-sdk/applifecycle/focus-session.md +++ b/hub/apps/windows-app-sdk/applifecycle/focus-session.md @@ -76,7 +76,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e) { var manager = Windows.UI.Shell.FocusSessionManager.GetDefault(); manager.IsFocusActiveChanged += Manager_IsFocusActiveChanged; - SetAnimatedGifAutoPlay(true); + SetAnimatedGifAutoPlay(!manager.IsFocusActive); } } @@ -84,11 +84,11 @@ private void Manager_IsFocusActiveChanged(Windows.UI.Shell.FocusSessionManager s { if(sender.IsFocusActive) { - SetAnimatedGifAutoPlay(true); + SetAnimatedGifAutoPlay(false); } else { - SetAnimatedGifAutoPlay(false); + SetAnimatedGifAutoPlay(true); } } ``` @@ -119,7 +119,7 @@ void MainWindow::OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArg m_focusStateChangedToken = m_focusSessionManager.IsFocusActiveChanged( { get_weak(), &MainWindow::OnFocusStateChanged }); - SetAnimatedGifAutoPlay(true); + SetAnimatedGifAutoPlay(!m_focusSessionManager.IsFocusActive()); } } @@ -127,7 +127,7 @@ void MainWindow::OnFocusStateChanged(Windows::UI::Shell::FocusSessionManager con Windows::Foundation::IInspectable const&) { auto temp = m_focusSessionManager.IsFocusActive(); - SetAnimatedGifAutoPlay(m_focusSessionManager.IsFocusActive()); + SetAnimatedGifAutoPlay(!m_focusSessionManager.IsFocusActive()); } ```