dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.04k stars 1.73k forks source link

Binding Context on Content View #14919

Open AathifMahir opened 1 year ago

AathifMahir commented 1 year ago

Description

Setting Binding Context on Content View Doesn't Work with Data Template with Compiled Bindings Unless We Set the Relative Source Explicitly, But the Same Content View Without Binding Context Works as Intended with Compiled Bindings without any Relative Source

More Information Regarding This Can be Found in the below Github Repo Sample

Is this the intended behavior or Bug?

Steps to Reproduce

  1. Create New Maui Project
  2. Create a Content View with Couple of Bindable Property
  3. Set the Binding Context to Same Content View
  4. Use that ContentView on MainPage.xaml with Compiled Binding Enabled

Link to public reproduction project repository

https://github.com/AathifMahir/BindingContextOnDataTemplate

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

Windows 11 22H2

Did you find any workaround?

No response

Relevant log output

No response

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

homeyf commented 9 months ago

Verified this issue with Visual Studio Enterprise 17.9.0 Preview 2.1. Can repro on Windows platforms with sample project. https://github.com/AathifMahir/BindingContextOnDataTemplate image