You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The exact code works in C#.
Obviously in C++, it generates the wrong code. For example, if I have <TextBlock Text="{x:Bind local:MyPage.ElementThemeToString(MyButton.ActualTheme), Mode=OneWay}" />, it generates
voidDependencyPropertyChanged(DependencyObject const& sender, DependencyProperty const& prop) override
{
if (sender)
{
if (sender == cacheDPC_MyButton_ActualTheme && ::winrt::Microsoft::UI::Xaml::Controls::Button::ActualThemeProperty() == prop)
The ActualThemeProperty() is in FrameworkElement not in Button, so it fails.
Curiously, {x:Bind} to my custom UserControl compiles fine, generates the correct code.
Steps to reproduce the bug
Create a C++ packaged project
Create a new Page (in case you say it's because of Window), Use this xaml
Describe the bug
The exact code works in C#.
Obviously in C++, it generates the wrong code. For example, if I have
<TextBlock Text="{x:Bind local:MyPage.ElementThemeToString(MyButton.ActualTheme), Mode=OneWay}" />
, it generatesThe
ActualThemeProperty()
is inFrameworkElement
not inButton
, so it fails.Curiously, {x:Bind} to my custom UserControl compiles fine, generates the correct code.
Steps to reproduce the bug
in code behind, simply return a string
Expected behavior
No response
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.6.5: 1.6.250205002
Windows version
Windows 11 (24H2): Build 26100
Additional context
No response
The text was updated successfully, but these errors were encountered: