WPF导航形式形成? [英] wpf navigate form to form?

查看:76
本文介绍了WPF导航形式形成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的wpf应用程序的输入表单中,我有一个按钮列表,用户可以在其中选择他想做的地方,例如.输入新客户,生成报告...

In the entry form of my wpf application, I have a list of buttons where the user can select where he wants to do, eg. enter new customer, run report...

选择用户后显示表单(例如输入新客户)的最佳方法是什么?我不希望表格弹出.同时隐藏当前工作并显示下一个表单将不起作用,因为wpf应用程序托管在window32应用程序内.

What is the best way to show the form (e.g enter new customer) after the user selection? I don't want the form to be a pop up. Also hiding the current work and show the next form will not work, because the wpf application is hosted inside the window32 app.

我的猜测是在用户控件中构建每个功能.在条目页面上,将所有用户控件加载到XAML中,但将其隐藏.当用户选择它时,显示相应的用户控件.

My guess is to build each of the functionality in user control. on the entry page, load all the user contorls in XAML, but hide them. Show the respectively user control when the user selects it.

由于我是WPF的新手,所以我不确定这是否是这样做的方法.似乎在加载所有控件上都有开销.

Since I am new to WPF, i am not sure if this is the way to do it. it seems like there's overhead on loading all the controls.

感谢您的帮助.

安吉拉

推荐答案

在窗口左侧列出所有按钮的列表

Have a list of all the buttons on the left side of your window

Button 1 ----------------------
Button 2 |     User Control   |
         |     Container      |
etc.     |--------------------|

基于左边的选择,即按钮1 =新客户,那么右边的用户控件将加载用户控件新客户的实现并将其放置在容器中,类似地,当他按下另一个选项时,他会得到一个不同的实现方式放置在容器中.这样,您就可以在他完成工作或转移到其他选择时处理他以前的工作.

based on the selection on the left ie Button 1 = new customer, then the user control on the right will load the implementation of user control new customer and place it in the container, similarly when he presses another option he will get a different implementation placed in the container. This way you can dispose his previous work when he is done or has moved to another option.

这篇关于WPF导航形式形成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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