wpf Page页与Frame的连接
来源:互联网 发布:rbf神经网络 python 编辑:程序博客网 时间:2024/05/16 14:19
1.新建WPF项目,在设计器中拖入Frame控件(工具箱Ctrl+w+x),外加Button控件
<Grid> <Frame Height="329" HorizontalAlignment="Left" Margin="12,93,0,0" Name="frame1" VerticalAlignment="Top" Width="554" /> <Button Content="点击" Height="23" HorizontalAlignment="Left" Margin="12,25,0,0" Name="button1" VerticalAlignment="Top" Width="75" /> </Grid>
2.在wpf默认命名空间下添加页(默认为Page1),再此我拖入label控件以便示范效果。
3.双击Button控件,在button_click事件方法下编写引入代码
private void button1_Click(object sender, RoutedEventArgs e) { Page1 p1 = new Page1(); frame1.Content = p1; }
4.到此结束,F5运行,结果如图所示:
0 0
- wpf Page页与Frame的连接
- WPF 中Frame + Page 的使用
- 关于C# wpf Frame 一次加载多个Page 的问题
- WPF Page页调用、触发Window的实现
- WPF 与网页交互(Frame,WebBrowser)
- Page Frame Management 页框管理
- WPF中MainWindow与Page通信
- WPF之Page介绍(以及Page之间的链接)
- 在WPF的Page中的导航
- WPF Page页面导航栏的隐藏
- WPF Page和UserControl的区别
- reserved page frame
- Page Frame Reclamation
- WebKit中Page,Frame和Document的关系
- WebKit中Page,Frame和Document的关系
- WebKit中Page,Frame和Document的关系
- WPF简单导航框架(Window与Page互相调用)
- Page Rendering - Main Frame and Impl Frame
- 单例模式的一种应用场景
- Android判断网络连接
- 《React-Native系列》React-Native实战系列博客汇总
- 《React-Native系列》42、键盘遮挡问题官方处理方法KeyboardAvoidingView
- 修改linux用户密码
- wpf Page页与Frame的连接
- 正则表达式
- 安卓支持下拉刷新,上拉加载更多的ListView
- 优秀博客搜集
- mysql-5.7.17-winx64免安装版环境配置 问题小记
- 智邦交换机在hybrid模式下license更新
- PAT编程基础 5-9 用天平找小球 (10分)
- apache优化
- 自定义AlertDialog