Skip to content

Added WinRT attribute to Columns - #215

Merged
w-ahmad merged 2 commits into
w-ahmad:mainfrom
licon4812:win-rt
Sep 11, 2025
Merged

w-ahmad merged 2 commits into
w-ahmad:mainfrom
licon4812:win-rt

Conversation

@licon4812

Copy link
Copy Markdown
Contributor

This pull request adds the [WinRT.GeneratedBindableCustomProperty] attribute to several TableView column classes to improve WinRT binding support on Windows platforms. Additionally, it changes the affected classes from non-partial to partial where appropriate, enabling further extensibility and compatibility with code generation tools.

I did this to ensure that if columns are auto generated, WinRT bindings work correctly.

WinRT binding support enhancements:

  • Added [WinRT.GeneratedBindableCustomProperty] attribute to all TableView column classes, gated behind the WINDOWS conditional compilation directive. This ensures custom property generation for WinRT bindings only on Windows. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Class definition changes for extensibility:

  • Changed all affected column classes (TableViewCheckBoxColumn, TableViewComboBoxColumn, TableViewDateColumn, TableViewNumberColumn, TableViewTemplateColumn, TableViewTextColumn, TableViewTimeColumn, TableViewToggleSwitchColumn) to be partial classes, allowing for future extensions and compatibility with code generation. [1] [2] [3] [4] [5] [6] [7] [8]

Base class updates:

  • Updated the abstract base classes TableViewBoundColumn and TableViewColumn to include the new attribute and, for TableViewColumn, to be partial as well. [1] [2]

@w-ahmad
w-ahmad requested a review from Copilot September 11, 2025 11:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 WinRT binding support for TableView column classes by applying the [WinRT.GeneratedBindableCustomProperty] attribute to all column types, enabling proper custom property generation for WinRT bindings on Windows platforms.

  • Adds conditional [WinRT.GeneratedBindableCustomProperty] attribute to all TableView column classes (gated behind WINDOWS compilation directive)
  • Changes affected column classes from non-partial to partial to enable extensibility and code generation compatibility
  • Updates both concrete column implementations and abstract base classes for consistent WinRT support

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
TableViewBoundColumn.cs Added WinRT attribute to abstract base class for bound columns
TableViewColumn.cs Added WinRT attribute and made abstract base class partial
TableViewCheckBoxColumn.cs Added WinRT attribute and made class partial
TableViewComboBoxColumn.cs Added WinRT attribute and made class partial
TableViewDateColumn.cs Added WinRT attribute (class already partial)
TableViewNumberColumn.cs Added WinRT attribute and made class partial
TableViewTemplateColumn.cs Added WinRT attribute and made class partial
TableViewTextColumn.cs Added WinRT attribute and made class partial
TableViewTimeColumn.cs Added WinRT attribute (class already partial)
TableViewToggleSwitchColumn.cs Added WinRT attribute and made class partial

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/Columns/TableViewBoundColumn.cs Outdated
Comment thread src/Columns/TableViewColumn.cs Outdated
@w-ahmad
w-ahmad merged commit c43579b into w-ahmad:main Sep 11, 2025
1 check passed
@licon4812
licon4812 deleted the win-rt branch September 12, 2025 23:09
@w-ahmad w-ahmad mentioned this pull request Oct 31, 2025
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.

3 participants