Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3d83a9b
Tabular: widen the dllmain activation carve-out for TableView
hiteshkrmsft Aug 25, 2026
5f65b7d
Tabular: trim the dllmain activation carve-out comments
hiteshkrmsft Aug 26, 2026
74a828a
Tabular: publish TableView through the package and fix theme-resource…
hiteshkrmsft Aug 26, 2026
060d2c9
Tabular: import MUXC's property sheet instead of duplicating it
hiteshkrmsft Aug 26, 2026
53f8f7e
Tabular: add the metadata project to MUXControlsTabular.sln
hiteshkrmsft Aug 26, 2026
95fe1a3
Tabular: build from MUXControls.sln and retire the second solution
hiteshkrmsft Aug 26, 2026
93a8f23
TableViewSampleApp: correct the docs about package availability
hiteshkrmsft Aug 26, 2026
0db68ca
Tabular: correct the idl project's note about MSB8028
hiteshkrmsft Aug 26, 2026
19eebbd
TableViewSampleApp: consume the package and delete the workaround mac…
hiteshkrmsft Aug 26, 2026
5cb867a
TableViewSampleApp: rewrite the docs for a sample with no workarounds
hiteshkrmsft Aug 26, 2026
c709595
Tabular: scrub an internal reference and drop the now-dead alias macro
hiteshkrmsft Aug 26, 2026
d7a7714
Tabular: drop the vestigial PRI alias properties and scrub an interna…
hiteshkrmsft Aug 26, 2026
bf9c1bb
TableViewSampleApp: remove the last mock-era leftovers
hiteshkrmsft Aug 26, 2026
d73db14
Samples: add a TableView consumer matrix for C#/C++ x packaged/unpack…
hiteshkrmsft Aug 26, 2026
353d0d3
Tabular: trim the build comments to what a reader needs
hiteshkrmsft Aug 26, 2026
1b3513a
Samples: shorten the x:Bind note in the C++ apps
hiteshkrmsft Aug 26, 2026
a7af17b
Tabular: ship the Tabular DLL in the XamlProduct payload
hiteshkrmsft Aug 26, 2026
7c47e42
Tabular: declare the idl project's dependency on MUXC's unmerged winmd
hiteshkrmsft Aug 26, 2026
aa25f37
Samples: bind the markup TableView's ItemsSource from XAML
hiteshkrmsft Aug 26, 2026
d7d8c5f
Tabular: correct the XamlProduct comment
hiteshkrmsft Aug 27, 2026
cf18726
Tabular: make the packaging project depend on the Tabular DLL
hiteshkrmsft Aug 27, 2026
5cea0bb
Tabular: address PR review nits
hiteshkrmsft Aug 27, 2026
600be7d
Samples: label which TableView comes from markup and which from code
hiteshkrmsft Aug 27, 2026
5238af6
Merge origin/main into user/hik/tableview-remove-workarounds
hiteshkrmsft Aug 27, 2026
d0b8e71
Tabular: fix the Pass2 winmd snapshot and merge TabularControlsResources
hiteshkrmsft Aug 27, 2026
0018e3a
Tabular: guarantee MergedWinMD is built before XamlCompile
hiteshkrmsft Aug 28, 2026
66e6c87
Samples: move the TableView consumer matrix to a follow-up change
hiteshkrmsft Aug 28, 2026
ef960d3
Merge origin/main into user/hik/tableview-remove-workarounds
hiteshkrmsft Aug 28, 2026
1ecf461
Tabular: keep midlrt winmds out of XamlCompile and supply the merged one
hiteshkrmsft Aug 28, 2026
6863d3a
Tabular: keep the control out of MUXFinalRelease packaging
hiteshkrmsft Aug 28, 2026
cfc75fa
Tabular: drop the metadata and registrations in MUXFinalRelease too
hiteshkrmsft Aug 28, 2026
a051f95
Tabular: note when the MUXFinalRelease exclusion must be revisited
hiteshkrmsft Aug 28, 2026
dc5a4d5
Samples: add a TableView consumer matrix for C#/C++ x packaged/unpack…
hiteshkrmsft Aug 28, 2026
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
5 changes: 4 additions & 1 deletion MergedWinMD/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
Expand Down Expand Up @@ -57,6 +57,9 @@
-->
<Reference Include="@(MuxControlsWinMD)" />
<ProjectReference Include="$(MuxControlsPath)\idl\Microsoft.UI.Xaml.Controls.idl.vcxproj" ReferenceOutputAssembly="false" />
<!-- Same build-order-only reference, for Tabular's metadata project. Never reference the Tabular
DLL project here: it consumes this project's output, so that would be a cycle. -->
<ProjectReference Include="$(MuxControlsPath)\idl-tabular\Microsoft.UI.Xaml.Controls.Tabular.idl.vcxproj" ReferenceOutputAssembly="false" />
</ItemGroup>

<ItemGroup>
Expand Down
77 changes: 77 additions & 0 deletions Samples/TableViewApp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# TableView consumer matrix

Four minimal apps that consume `TableView` the way a real customer would — **C# and C++, packaged and
unpackaged** — to prove the control works in every host shape without app-side workarounds.

| | Packaged | Unpackaged |
|---|---|---|
| **C#** | `TableViewAppCsPackaged` | `TableViewAppCsUnpackaged` |
| **C++** | `TableViewAppCppPackaged` | `TableViewAppCppUnpackaged` |

Modelled on the [ChartApp](../ChartApp) samples, which are the existing pattern in this repo for a
separately-built control set.

## What they prove

Each app references `Microsoft.WindowsAppSDK.WinUI` **and nothing else**. `App.xaml` merges
`XamlControlsResources` plus `TabularControlsResources`. There is no projection regeneration, no
manifest injection, no theme resources compiled from the control source, no staged DLL, and no type
seed — the control resolves its own default style and theme resources from the package.

`TabularControlsResources` is Tabular's own theme-resource dictionary, the exact analogue of
`XamlControlsResources` for MUXC, and merging it is a normal part of consuming the control set
rather than a workaround. It is required: `TableView`'s column-header style resolves
`SortIndicatorForeground` from it, and `SortIndicator` ships in the Tabular DLL rather than in MUXC
(`controls/Tabular.ProjectImports.targets` is the only importer of `SortIndicator.vcxitems`).
Without the merge the app throws `XamlParseException 0x802B000A` — "Cannot find a Resource with the
Name/Key SortIndicatorForeground" — during the first layout pass, which surfaces as a
`0xC000027B` stowed exception a few seconds after launch.

Each app instantiates `TableView` **twice on purpose**:

- once from **markup**, which exercises XamlTypeInfo, the metadata provider and XAML-driven activation;
- once from **code-behind**, which exercises direct WinRT activation with no markup involved.

Those are separate paths and either can fail alone, so a conformance check wants both.

## Build and run

```
.\initrun.ps1 msb /restore Samples\TableViewApp\TableViewAppCsPackaged\TableViewAppCsPackaged.csproj /p:Platform=x64
```

To test a locally built control, pack the component and override the version:

```
.\pack.component.cmd /version 3.0.0-mylocal
... /p:WinUIVersion=3.0.0-mylocal
```

The unpackaged apps run straight from their output directory. The packaged apps produce a loose
layout; register it with `Add-AppxPackage -Register <outdir>\AppxManifest.xml` and launch from Start.

## Why the C# and C++ apps bind differently

The C# apps use `TableViewTextColumn.Binding` with a classic `{Binding}` against a plain `Person`
class. The C++ apps use `TableViewTemplateColumn.CellTemplate` with `x:Bind` against a `Person`
runtimeclass declared in `MainWindow.idl`.

That difference is a **C++/WinRT data-binding rule, not a control limitation**. Classic `{Binding}`
resolves properties through reflection in .NET, but C++/WinRT has no reflection: it needs an
`IXamlType`, which the XAML compiler emits only for types it encounters **in markup**, or an
explicit `ICustomPropertyProvider` implementation. A data type constructed purely from code has
neither, so `{Binding}` silently resolves nothing and every cell renders empty while headers, rows,
grid lines and theming all look perfectly correct.

`x:Bind` compiles the property access at build time, needs no runtime type information, and is the
right default for a C++/WinRT consumer.

## Preview-API warnings are left visible here

`TableView` is `[MUX_PREVIEW]`, so C# usage raises `CS8305` and XAML usage raises `WMC1501`
("for evaluation purposes only"). These apps **do not** suppress them: they are small, the warning
count stays low, and a consumer reading a conformance sample should see that the API is preview.

`TableViewSampleApp` takes the opposite choice deliberately — it exercises the whole API surface, so
un-suppressed `CS8305` fires 324 times and would bury every other warning. That difference is
intentional, not an oversight.
135 changes: 135 additions & 0 deletions Samples/TableViewApp/TableViewApp.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.37314.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TableViewAppCppUnpackaged", "TableViewAppCppUnpackaged\TableViewAppCppUnpackaged.vcxproj", "{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TableViewAppCppPackaged", "TableViewAppCppPackaged\TableViewAppCppPackaged.vcxproj", "{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TableViewAppCsUnpackaged", "TableViewAppCsUnpackaged\TableViewAppCsUnpackaged.csproj", "{F9AE50FC-FACF-4E88-8C05-27DF41902470}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TableViewAppCsPackaged", "TableViewAppCsPackaged\TableViewAppCsPackaged.csproj", "{B43A3294-ED51-4784-9957-E7D033330B05}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|ARM64EC = Debug|ARM64EC
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM64 = Release|ARM64
Release|ARM64EC = Release|ARM64EC
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Debug|ARM64.ActiveCfg = Debug|ARM64
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Debug|ARM64.Build.0 = Debug|ARM64
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Debug|ARM64EC.Build.0 = Debug|ARM64EC
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Debug|Win32.ActiveCfg = Debug|Win32
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Debug|Win32.Build.0 = Debug|Win32
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Debug|x64.ActiveCfg = Debug|x64
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Debug|x64.Build.0 = Debug|x64
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Debug|x86.ActiveCfg = Debug|Win32
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Debug|x86.Build.0 = Debug|Win32
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Release|ARM64.ActiveCfg = Release|ARM64
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Release|ARM64.Build.0 = Release|ARM64
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Release|ARM64EC.ActiveCfg = Release|ARM64EC
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Release|ARM64EC.Build.0 = Release|ARM64EC
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Release|Win32.ActiveCfg = Release|Win32
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Release|Win32.Build.0 = Release|Win32
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Release|x64.ActiveCfg = Release|x64
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Release|x64.Build.0 = Release|x64
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Release|x86.ActiveCfg = Release|Win32
{050FC711-CCFB-4BB4-B771-D4C35E8D5FCE}.Release|x86.Build.0 = Release|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|ARM64.ActiveCfg = Debug|ARM64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|ARM64.Build.0 = Debug|ARM64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|ARM64.Deploy.0 = Debug|ARM64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|ARM64EC.Build.0 = Debug|ARM64EC
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|ARM64EC.Deploy.0 = Debug|ARM64EC
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|Win32.ActiveCfg = Debug|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|Win32.Build.0 = Debug|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|Win32.Deploy.0 = Debug|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|x64.ActiveCfg = Debug|x64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|x64.Build.0 = Debug|x64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|x64.Deploy.0 = Debug|x64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|x86.ActiveCfg = Debug|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|x86.Build.0 = Debug|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Debug|x86.Deploy.0 = Debug|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|ARM64.ActiveCfg = Release|ARM64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|ARM64.Build.0 = Release|ARM64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|ARM64.Deploy.0 = Release|ARM64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|ARM64EC.ActiveCfg = Release|ARM64EC
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|ARM64EC.Build.0 = Release|ARM64EC
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|ARM64EC.Deploy.0 = Release|ARM64EC
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|Win32.ActiveCfg = Release|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|Win32.Build.0 = Release|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|Win32.Deploy.0 = Release|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|x64.ActiveCfg = Release|x64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|x64.Build.0 = Release|x64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|x64.Deploy.0 = Release|x64
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|x86.ActiveCfg = Release|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|x86.Build.0 = Release|Win32
{1930FFBA-85CD-4E12-BBF1-23CB28D47D4F}.Release|x86.Deploy.0 = Release|Win32
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Debug|ARM64.ActiveCfg = Debug|ARM64
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Debug|ARM64.Build.0 = Debug|ARM64
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Debug|ARM64EC.Build.0 = Debug|ARM64EC
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Debug|Win32.ActiveCfg = Debug|x86
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Debug|Win32.Build.0 = Debug|x86
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Debug|x64.ActiveCfg = Debug|x64
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Debug|x64.Build.0 = Debug|x64
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Debug|x86.ActiveCfg = Debug|x86
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Debug|x86.Build.0 = Debug|x86
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Release|ARM64.ActiveCfg = Release|ARM64
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Release|ARM64.Build.0 = Release|ARM64
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Release|ARM64EC.ActiveCfg = Release|ARM64EC
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Release|ARM64EC.Build.0 = Release|ARM64EC
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Release|Win32.ActiveCfg = Release|x86
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Release|Win32.Build.0 = Release|x86
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Release|x64.ActiveCfg = Release|x64
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Release|x64.Build.0 = Release|x64
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Release|x86.ActiveCfg = Release|x86
{F9AE50FC-FACF-4E88-8C05-27DF41902470}.Release|x86.Build.0 = Release|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|ARM64.ActiveCfg = Debug|ARM64
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|ARM64.Build.0 = Debug|ARM64
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|ARM64.Deploy.0 = Debug|ARM64
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|ARM64EC.Build.0 = Debug|ARM64EC
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|ARM64EC.Deploy.0 = Debug|ARM64EC
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|Win32.ActiveCfg = Debug|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|Win32.Build.0 = Debug|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|Win32.Deploy.0 = Debug|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|x64.ActiveCfg = Debug|x64
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|x64.Build.0 = Debug|x64
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|x64.Deploy.0 = Debug|x64
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|x86.ActiveCfg = Debug|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|x86.Build.0 = Debug|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Debug|x86.Deploy.0 = Debug|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|ARM64.ActiveCfg = Release|ARM64
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|ARM64.Build.0 = Release|ARM64
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|ARM64.Deploy.0 = Release|ARM64
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|ARM64EC.ActiveCfg = Release|ARM64EC
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|ARM64EC.Build.0 = Release|ARM64EC
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|ARM64EC.Deploy.0 = Release|ARM64EC
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|Win32.ActiveCfg = Release|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|Win32.Build.0 = Release|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|Win32.Deploy.0 = Release|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|x64.ActiveCfg = Release|x64
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|x64.Build.0 = Release|x64
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|x64.Deploy.0 = Release|x64
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|x86.ActiveCfg = Release|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|x86.Build.0 = Release|x86
{B43A3294-ED51-4784-9957-E7D033330B05}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {09593217-0E5B-4DFD-8DF3-16E5A2374FB9}
EndGlobalSection
EndGlobal
18 changes: 18 additions & 0 deletions Samples/TableViewApp/TableViewAppCppPackaged/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Application
x:Class="TableViewAppCppPackaged.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:TableViewAppCppPackaged">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Tabular ships its own theme resources, exactly as MUXC ships XamlControlsResources.
TableView's column-header style resolves SortIndicatorForeground from this
dictionary, so activation fails without it. -->
<TabularControlsResources xmlns="using:Microsoft.UI.Xaml.Controls.Tabular" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
29 changes: 29 additions & 0 deletions Samples/TableViewApp/TableViewAppCppPackaged/App.xaml.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "pch.h"
#include "App.xaml.h"
#include "MainWindow.xaml.h"

using namespace winrt;
using namespace Microsoft::UI::Xaml;

namespace winrt::TableViewAppCppPackaged::implementation
{
App::App()
{
#if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException([](IInspectable const&, UnhandledExceptionEventArgs const& e)
{
if (IsDebuggerPresent())
{
auto errorMessage = e.Message();
__debugbreak();
}
});
#endif
}

void App::OnLaunched([[maybe_unused]] LaunchActivatedEventArgs const& e)
{
window = make<MainWindow>();
window.Activate();
}
}
16 changes: 16 additions & 0 deletions Samples/TableViewApp/TableViewAppCppPackaged/App.xaml.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include "App.xaml.g.h"

namespace winrt::TableViewAppCppPackaged::implementation
{
struct App : AppT<App>
{
App();

void OnLaunched(Microsoft::UI::Xaml::LaunchActivatedEventArgs const&);

private:
winrt::Microsoft::UI::Xaml::Window window{ nullptr };
};
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions Samples/TableViewApp/TableViewAppCppPackaged/MainWindow.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace TableViewAppCppPackaged
{
[default_interface]
runtimeclass Person
{
Person();
String Name;
Int32 Age;
String AgeText{ get; };
}

[default_interface]
runtimeclass MainWindow : Microsoft.UI.Xaml.Window
{
MainWindow();
Windows.Foundation.Collections.IObservableVector<IInspectable> People{ get; };
}
}
Loading
Loading