Click here to Skip to main content
15,880,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a WPF Window, and on pressing Button A i want to display some content in a certain area of my window.
when pressing "Button B" the content shall disappear and other content shall appear on that place instead.

What I have tried:

i tried to use the Frame control for that:
i defined 2 WPF Pages (one for content of Button A and one for content of Button B), and on pressing the button the frame.Content was set to the desired page.
But unfortunately as soon as i reset the content to something else i get the navigation bar.
is there a way how i can remove that navigation pane? i only want the contents of the page visible and no navigation and only one page at a time not multiple page with navigation panel
Posted
Updated 3-Dec-19 5:57am

1 solution

Use two user controls in one page / window. Put both inside a grid (cell) - collapse one, show the other.

Grids are one of the few content controls that allows content to overlay; most "stack" or only allow one child.
 
Share this answer
 
Comments
JitChakraborty 3-Dec-19 23:45pm    
That's a nice idea but this will not work in my case. i just want to clear the history of frame control in wpf.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900