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.26k stars 1.76k forks source link

Add fallback to ContentPresenter Content binding using reflection #25992

Open simonrozsival opened 22 hours ago

simonrozsival commented 22 hours ago

Description of Change

It turns out that for customers that are deriving from TemplatedView run into issues with the ContentPresenter and the binding for the Content property.

AFAIK we currently don't have any docs that would mention how to implement custom TemplatedView that could be updated to mention that the "proper" way to do this is to implement the object IContentView.Content property in the derived class. I added runtime warning but I'm not sure how many developers will actually see this or just miss it completely.

cc @PureWeen @mattleibow @StephaneDelcroix @davidbritch

Issues Fixed

Fixes #25947