I created two pages in maui app: a ContentView and a ContentPage. Inside the ContentView component, I need to call a popup and show some contents in the page. In my current Implementation on ContentView, I declared a bindable property of type ContentPage for the reason of using the instance to call the ShowPopupAsync method.
Bindable Property in the nxi-lookup.xaml.cs
public BindableProperty ParentPageProperty =
BindableProperty.Create(
nameof(Page),
typeof(ContentPage),
typeof(nxi_lookup),
defaultValue: null,
defaultBindingMode: BindingMode.OneWay);
my contentpage xaml
<custom:nxi_lookup Page="{Binding Page,Source={x:Reference Production}}" Margin="0,0,10,10" WidthValue="10" LabelText="Lookup 1" IsRequired="True"/>
Actual usage for popup inside the contentview
if (Page != null)
{
var popup = new nxi_popup();
var content = new nxi_lookupcontent();
popup.Content = content;
await Page.ShowPopupAsync(popup);
}
Error XFC0009 No property, BindableProperty, or event found for "Page", or mismatching type.
I tried changing the type of the bindable property but does not work. I expected to bind the contentpage to my property in content view.
Is there any way to properly implement popup in a contentview?