Closed AmirImam closed 2 years ago
Yeah, seems like I've accidentally broken it for other controls (apart from Application). I'll try to fix it soon.
I'm wondering though - what is your use case? Why do you add content to a page inside of other Blazor component?
I want to use NavigationPage to navigate between pages, and I want to set this NavigationPage to the Details of a FlyoutPage. I have always designed my classic XF apps like this, and I want to try it here
I see.
As a temporary workaround (until I fix this issue), you can retrieve a page via smth like this (your main page should have ContentPage as a root element):
var rootContainer = new RootContainerHandler();
await Renderer.AddComponent<MainPage>(rootContainer);
var page = (MC.Page)rootContainer.Elements[0];
Also, you can take a look at a FlyoutPage sample, it makes it work without Renderer interaction: https://github.com/Dreamescaper/BlazorBindings.Maui/blob/main/samples/FlyoutPageSample/Views/MainPage.razor .
I see.
As a temporary workaround (until I fix this issue), you can retrieve a page via smth like this (your main page should have ContentPage as a root element):
var rootContainer = new RootContainerHandler(); await Renderer.AddComponent<MainPage>(rootContainer); var page = (MC.Page)rootContainer.Elements[0];
Also, you can take a look at a FlyoutPage sample, it makes it work without Renderer interaction: https://github.com/Dreamescaper/BlazorBindings.Maui/blob/main/samples/FlyoutPageSample/Views/MainPage.razor .
Thank you, this workaround worked fine. I think that I can't test FlyoutMenuPage yet, did you release it?
FlyoutMenuPage
and FlyoutMenuItem
are parts of that same sample
https://github.com/Dreamescaper/BlazorBindings.Maui/tree/main/samples/FlyoutPageSample/Views
Bugfix was merged, and will be released soon (-ish), therefore I'm closing this item. If you'd like, you can check it out in the nightly builds (read here).
Hi This line of code throws an exception
Exception is
MainPage is a ContentView I tried to make it a ContentPage but it throws the same error I tried this on windows & android