Click here to Skip to main content
14,421,436 members
Rate this:
Please Sign up or sign in to vote.
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
Updated 3-Dec-19 6:57am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100