setting the parent fixes the BindingContext of the view
This commit is contained in:
Родитель
e775d99028
Коммит
0a64b56ca5
|
@ -24,9 +24,6 @@ public partial class Popup
|
|||
{
|
||||
var mauiContext = virtualView.Handler?.MauiContext ?? throw new NullReferenceException(nameof(IMauiContext));
|
||||
var view = (View?)virtualView.Content ?? throw new InvalidOperationException($"{nameof(IPopup.Content)} can't be null here.");
|
||||
#if !NET8_0_OR_GREATER
|
||||
view.SetBinding(BindingContextProperty, new Binding { Source = virtualView, Path = BindingContextProperty.PropertyName });
|
||||
#endif
|
||||
var contentPage = new ContentPage
|
||||
{
|
||||
Content = view
|
||||
|
|
Загрузка…
Ссылка в новой задаче