unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.45k stars 685 forks source link

Support for `{ThemeResource}` in `TargetNullValue` #16505

Closed MartinZikmund closed 1 week ago

MartinZikmund commented 2 weeks ago

What would you like to be added

WinUI TextBox, NumberBox and ComboBox use the following syntax:

Foreground="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource TextControlPlaceholderForeground}}"

This does not work correctly and a workaround must be used (see the Fluent v2 style files)

Why is this needed

Workaround should not be needed

For which platform

WebAssembly, Android, iOS, Mac Catalyst, Skia (WPF), Skia (Linux X11), Skia (macOS), Skia (Linux Framebuffer), Skia (GTK), Windows (WinAppSDK)

Anything else we need to know?

No response