Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 26, 2025

The Windows App SDK version of the "Data Binding In Depth" article was missing critical information about when BindableAttribute is required for C++/WinRT when using the {Binding} markup extension. This information was present in the UWP version of the same article but was inadvertently lost during the transition to Windows App SDK documentation.

Changes Made

Added BindableAttribute requirement information in two key sections:

  1. Binding target section - Added note about BindableAttribute requirement
  2. Binding object declared using {Binding} section - Added comprehensive information including:
    • When BindableAttribute is required for C++/WinRT
    • C++/WinRT code example showing proper attribute usage
    • Important note about Windows SDK version requirements
    • Fallback information for older SDK versions

Example of added C++/WinRT code:

// HostViewModel.idl
// Add this attribute:
[Microsoft.UI.Xaml.Data.Bindable]
runtimeclass HostViewModel : Microsoft.UI.Xaml.Data.INotifyPropertyChanged
{
    HostViewModel();
    String NextButtonText;
}

Key information restored:

  • BindableAttribute is required for C++/WinRT runtime classes when using {Binding} markup extension
  • Attribute is available starting with Windows SDK version 10.0.17763.0 (Windows 10, version 1809)
  • Fallback to implementing ICustomPropertyProvider and ICustomProperty interfaces when BindableAttribute is not available
  • No attribute needed when using {x:Bind} markup extension

All API references have been updated to use the appropriate Windows App SDK namespaces (Microsoft.UI.Xaml.Data instead of Windows.UI.Xaml.Data).

Fixes #5037.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor

Learn Build status updates of commit 804579b:

⚠️ Validation status: warnings

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@alvinashcraft alvinashcraft self-requested a review August 26, 2025 15:13
Co-authored-by: alvinashcraft <73072+alvinashcraft@users.noreply.github.com>
Copy link
Contributor

Learn Build status updates of commit 1b29c44:

✅ Validation status: passed

File Status Preview URL Details
hub/apps/develop/data-binding/data-binding-in-depth.md ✅Succeeded

For more details, please refer to the build report.

@Copilot Copilot AI changed the title [WIP] Windows App SDK version of "Data Binding In Depth" article is missing information about BindableAttribute Add missing BindableAttribute information for C++/WinRT data binding in Windows App SDK documentation Aug 26, 2025
Copilot finished work on behalf of alvinashcraft August 26, 2025 15:22
@alvinashcraft alvinashcraft marked this pull request as ready for review August 26, 2025 15:29
@alvinashcraft alvinashcraft self-requested a review August 26, 2025 15:30
Copy link
Contributor

Learn Build status updates of commit 9e28f05:

✅ Validation status: passed

File Status Preview URL Details
hub/apps/develop/data-binding/data-binding-in-depth.md ✅Succeeded

For more details, please refer to the build report.

@alvinashcraft alvinashcraft merged commit 01986a9 into docs Aug 26, 2025
2 checks passed
@alvinashcraft alvinashcraft deleted the copilot/fix-5037 branch August 26, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows App SDK version of "Data Binding In Depth" article is missing information about BindableAttribute

2 participants