Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

show a page inside a window in XAML

Tags:

c#

window

wpf

frame

I have a tabcontrol in my window, inside each tabitem I want to have a different page.
I can achieve this by making a Frame inside the TabItem and in the behind code use for example:

frame1.Content = new Pages.MyPage()  

How can I do the same thing in XAML?

like image 719
Steinthor.palsson Avatar asked Mar 29 '11 19:03

Steinthor.palsson


People also ask

What is the use of window in XAML?

It is the root window of an XAML application which provides minimize/maximize option, Title bar, border, and close button. It also provides the ability to create, configure, show, and manage the lifetime of windows and dialog boxes. The hierarchical inheritance of Window class is as follows −

What is XAML popup in WPF?

XAML Popup in WPF. A XAML Popup represents a popup window. A popup window is a window that floats over a page or window providing functionality for some quick action, for example a login control on a page or to provide an animated popup tip. Fortunately, WPF comes with a Popup control to provide this functionality.

How do I create an appbar in XAML?

You typically use a panel or items control as the immediate child of a Page, so that you can have the page contain and compose multiple elements of a UI. You can also specify app bars, with the TopAppBar and BottomAppBar properties. You must use property element syntax for these properties to contain the AppBar values in XAML.

What is the use of Minimize Window in XAML?

It is the root window of an XAML application which provides minimize/maximize option, Title bar, border, and close button. It also provides the ability to create, configure, show, and manage the lifetime of windows and dialog boxes.


1 Answers

<TabItem>
  <Frame Source="MyPage.xaml" />
</TabItem>
like image 162
Y.Yanavichus Avatar answered Oct 24 '22 12:10

Y.Yanavichus