显示XAML窗口内页 [英] show a page inside a window in XAML

查看:129
本文介绍了显示XAML窗口内页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个TabControl在我的窗口,每个TabItem的里面我想有一个不同的页面结果
我可以通过使TabItem的内部和后面的代码中使用例如框架实现这一点:

  frame1.Content =新Pages.MyPage()

我如何做同样的事情在XAML?


解决方案

 <&TabItem的GT; 
<框架的源代码=MyPage.xaml/>
< / TabItem的>


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?

解决方案

<TabItem>
  <Frame Source="MyPage.xaml" />
</TabItem>

这篇关于显示XAML窗口内页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆