Open HavenDV opened 2 years ago
https://github.com/unoplatform/uno/blob/8134e5eb7459883a08c60a8aac4cbac2aeb8487a/src/Uno.UI.Tests/Windows_UI_Xaml_Data/BindingTests/Given_Binding.cs#L137-L167
ElementNameSubject.Name returns null because the generated code for initialization uses a constructor without parameters:
ElementNameSubject.Name
null
private global::Windows.UI.Xaml.Data.ElementNameSubject _topLevelSubject = new global::Windows.UI.Xaml.Data.ElementNameSubject(); public global::Windows.UI.Xaml.Controls.TextBlock topLevel { get { return (global::Windows.UI.Xaml.Controls.TextBlock)_topLevelSubject.ElementInstance; } set { _topLevelSubject.ElementInstance = value; } }
constructor call must contain arguments
No response
ElementName should actually be a string, not object. It's currently object as we commonly use ElementNameSubject for it. But that's not the ideal behavior.
ElementName
object
ElementNameSubject
Current behavior
https://github.com/unoplatform/uno/blob/8134e5eb7459883a08c60a8aac4cbac2aeb8487a/src/Uno.UI.Tests/Windows_UI_Xaml_Data/BindingTests/Given_Binding.cs#L137-L167
ElementNameSubject.Name
returnsnull
because the generated code for initialization uses a constructor without parameters:Expected behavior
constructor call must contain arguments
How to reproduce it (as minimally and precisely as possible)
No response
Workaround
No response
Works on UWP/WinUI
No response
Environment
No response
NuGet package version(s)
No response
Affected platforms
No response
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response