question

WeiWen-3421 avatar image
0 Votes"
WeiWen-3421 asked WenyanZhang-MSFT commented

How to push a content view on top of another content view

I have a content page that hosts a top view and a bottom content view. The top view should stay fixed. Based on the users' choice, another content view should be added on top of the existing bottom view. I cannot find a push function that can achieve this. The push functionality seems to only exist for content pages.

dotnet-xamarin
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes, there is a PushAsync method in Navigation , I'm afraid it isn't suitable for this scenario. If you just want to add a view, you can use layout.Children.Add(newView) . Maybe you can implement a view and use the property of IsVisible to display or hide. You can also customize a popup view , this thread maybe could give you some ideas.






0 Votes 0 ·

@WenyanZhang-MSFT Thank you for the info. I eventually decided to use ContentPage, but still added the same top view for each page that I need to push on to stack. This is because the behavior is like pushing onto and popping off a stack. ContentView cannot help me achieve this.

0 Votes 0 ·

You're welcome. You can try to use ContentPage, wish it works for you.

0 Votes 0 ·

0 Answers