Describe the bug
The non-alphanumeric property name is not recognized in the x: Bind path and cannot be built.
Steps to reproduce the bug
Create a Blank App (Universal Windows)
Insert the code below and build
MainPage.xaml.cs
public sealed partial class MainPage : Page {
public ViewModel ViewModel { get; } = new ViewModel();
}
public class ViewModel {
public string A { get; }
public string あ { get; }
public string Bい { get; }
public string うC { get; }
}
MainPage.xaml
<Grid>
<!-- OK -->
<TextBlock Text="{x:Bind ViewModel.A}"/>
<!-- Error -->
<TextBlock Text="{x:Bind ViewModel.あ}"/> <!-- Invalid binding path 'ViewModel.あ' : Syntax error at '<EOF>' -->
<TextBlock Text="{x:Bind ViewModel.Bい}"/> <!-- Invalid binding path 'ViewModel.Bい' : Property 'B' not found on type 'ViewModel' -->
<TextBlock Text="{x:Bind ViewModel.うC}"/> <!-- Invalid binding path 'ViewModel.うC' : Property 'C' not found on type 'ViewModel' -->
</Grid>
Expected behavior
No build error
Version Info
Windows app type:
UWP
Win32
Yes
Windows 10 version
Saw the problem?
Insider Build (xxxxx)
October 2020 Update (19042)
Yes
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor
Saw the problem?
Desktop
Yes
Xbox
Surface Hub
IoT
Additional context
I'm trying to migrate WPF to UWP, However, I can't use x:Bind because there are so many Japanese property names in this project.
Describe the bug The non-alphanumeric property name is not recognized in the x: Bind path and cannot be built.
Steps to reproduce the bug
Expected behavior No build error
Additional context I'm trying to migrate WPF to UWP, However, I can't use x:Bind because there are so many Japanese property names in this project.