Skip to content

Conversation

@niels9001
Copy link
Collaborator

@niels9001 niels9001 commented Dec 1, 2025

  • Bugfxies: certain properties, like the MinWidth, MinHeight and Stretch for Image were not working because the code-behind was not leveraging the actual theme, but only listening to the default theme. As a result, setting these properties did nothing.
  • A new sample was added to show a fully custom config

⚠️ 99% of this code was AI generated by Claude Opus 4.5 in VS Code.

image

@Arlodotexe
Copy link
Member

Arlodotexe commented Dec 12, 2025

@niels9001 Looks like it's failing on UWP:

D:\a\Labs-Windows\Labs-Windows\components\MarkdownTextBlock\samples\MarkdownTextBlockCustomThemeSample.xaml(52,22): XamlCompiler error WMC0001: Unknown type 'Expander' in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' [D:\a\Labs-Windows\Labs-Windows\components\MarkdownTextBlock\samples\MarkdownTextBlock.Samples.csproj::TargetFramework=uap10.0.17763
[...]
D:\a\Labs-Windows\Labs-Windows\components\MarkdownTextBlock\samples\MarkdownTextBlockCustomThemeSample.xaml(52,22): XamlCompiler error WMC0001: Unknown type 'Expander' in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation' [D:\a\Labs-Windows\Labs-Windows\components\MarkdownTextBlock\samples\MarkdownTextBlock.Samples.csproj::TargetFramework=net9.0-windows10.0.26100.0]

Run ./tooling/GenerateSingleSolution.ps1 -c MarkdownTextBlock -winui 2 from repo root to switch from Wasdk/WinUI3 to UWP/WinUI2 locally.

@Arlodotexe
Copy link
Member

Arlodotexe commented Dec 12, 2025

⚠️ 99% of this code was AI generated by Claude Opus 4.5 in VS Code.

It reinvented the entire sample options pane from scratch and polluted the main sample source code which is displayed to users in the gallery. Instead, it should have:

  1. Created a separate control just for the options pane
  2. Placed a custom sample options pane attribute on it and
  3. Used the XamlNamedPropertyRelay to access x:Name'd XAML elements in the sample from the sample options pane code-behind.

Existing samples using this setup can be found in the ColorAnalyzer and Media components. This is necessary to keep it easy for devs to copy sample source code from the sample gallery app.

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