Skip to content

Conversation

@DinahK-2SO
Copy link

This PR adds 2 WinAppSdk1.8 samples to main branch:

  • CameraCaptureUI
  • StoragePickers

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds two WinAppSdk 1.8 sample applications to the main branch: CameraCaptureUI and StoragePickers. The changes include sample code, configuration files, deployment images, and project manifests for both C# and C++ implementations of the StoragePickers sample.

Key Changes

  • Added StoragePickers sample with C# and C++ implementations
  • Included deployment documentation images (deploy6.png, deploy7.png, deploy8.png)
  • Added project configuration files for packaged and unpackaged deployment scenarios

Reviewed Changes

Copilot reviewed 83 out of 120 changed files in this pull request and generated 32 comments.

Show a summary per file
File Description
images/*.png Deployment documentation images (binary files)
cs-sample/app.manifest Application manifest for unpackaged scenarios
cs-sample/Properties/launchSettings.json Launch profiles for packaged/unpackaged modes
cs-sample/Properties/PublishProfiles/*.pubxml Publish configurations for different architectures
cs-sample/Package.appxmanifest MSIX package manifest
cs-sample/MainWindow.xaml.cs C# sample implementation
cs-sample/MainWindow.xaml XAML UI definition
cpp-sample/pch.cpp Precompiled header source
cpp-sample/MainWindow.idl WinRT component definition

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishDir>bin\\\win-x64\publish\</PublishDir>
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PublishDir path contains triple backslashes (\\\) which is likely unintentional. This should be either a single backslash or use the standard MSBuild path format with $(Configuration) and $(TargetFramework) variables like in win-x86.pubxml.

Copilot uses AI. Check for mistakes.
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>ARM64</Platform>
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
<PublishDir>bin\\\win-arm64\publish\win-arm64\</PublishDir>
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PublishDir path has two issues: it contains triple backslashes (\\\) and duplicates 'win-arm64' in the path. This should be corrected to match the pattern in win-x86.pubxml or use a consistent format.

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +7
<Platform>ARM64</Platform>
<PublishDir>bin\\\win-x64\publish\win-x64\</PublishDir>
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Platform is set to ARM64 but PublishDir references win-x64. This mismatch will cause the wrong architecture binaries to be published to the wrong location. Either the Platform should be x64 or the PublishDir should reference ARM64.

Copilot uses AI. Check for mistakes.
</Dependencies>

<Resources>
<Resource Language="zh-Hans"/> <!--x-generate-->
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The language resource is hardcoded to Chinese Simplified (zh-Hans) which may not be appropriate for a general sample. Consider using 'en-US' or 'x-generate' to support multiple languages, or add a comment explaining why this specific language was chosen.

Copilot uses AI. Check for mistakes.
Comment on lines +71 to +80
private string[] GetFileFilters()
{
string input = FileTypeFilterInput.Text?.Trim() ?? "";
if (string.IsNullOrEmpty(input))
return ["*"];

return input.Split([','], StringSplitOptions.RemoveEmptyEntries)
.Select(s => s.Trim())
.ToArray();
}
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The collection expression [\"*\"] syntax requires C# 12 or later. While this is likely fine for .NET 8, consider verifying that the project's language version supports this feature, or use the more traditional new[] { \"*\" } syntax for broader compatibility.

Copilot uses AI. Check for mistakes.
{
public partial class Scenario2_CaptureVideo : Page
{
private MainPage rootPage;
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Field 'rootPage' can be 'readonly'.

Copilot uses AI. Check for mistakes.
Comment on lines +128 to +131
catch (Exception ex)
{
LogResult($"Error in New FileOpenPicker: {ex.Message}");
}
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic catch clause.

Copilot uses AI. Check for mistakes.
Comment on lines +181 to +184
catch (Exception ex)
{
LogResult($"Error in New PickMultipleFilesAsync: {ex.Message}");
}
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic catch clause.

Copilot uses AI. Check for mistakes.
Comment on lines +251 to +254
catch (Exception ex)
{
LogResult($"Error in New FileTypeChoices: {ex.Message}");
}
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic catch clause.

Copilot uses AI. Check for mistakes.
Comment on lines +290 to +293
catch (Exception ex)
{
LogResult($"Error in New FolderPicker: {ex.Message}");
}
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic catch clause.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants