如何设计一个多界面的wpf应用程序 [英] How to design a wpf application with multiple interfaces

查看:35
本文介绍了如何设计一个多界面的wpf应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习如何设计具有多个不同用户界面的应用程序.它是一个应用程序,医生可以在其中查看患者记录、开处方等.在设计这个(包括登录)时,我为登录、处方书写、病史浏览创建了单独的用户控件,并将它们的所有可见性设置为隐藏,然后我将它们全部放在主应用程序的单个堆栈面板中窗户.我正在考虑使用代码隐藏文件的帮助来显示适当的用户控件.

I'm trying to learn how to design an application which has several different user inferfaces. its an application where a doctor can view patient records, write prescriptions and so on. when designing this one(including the login) I have created seperate user controls for login, prescription writing, medical history browing and set all of their visibility to hidden and then I've put all of them in a single stack panel on the main application window. I'm thinking to display the appropriate usercontrols using the help of code-behind files.

我想知道这是创建 wpf 应用程序的有效方法,或者您将如何设计具有多个界面的应用程序(我想在它们上使用一些动画,例如淡入和关闭时隐藏用户控制).

I would like to know is this a valid way of creating wpf applications, or how you would do in desining applications with multiple interfaces (I'm plaining to use some animations on them, such as fade in and hide when closed a user control ).

谢谢.

推荐答案

对于一个简单的项目,这完全没问题.但是,随着视图数量的增加,您可能需要设计一个系统来管理此堆栈面板.

For a simple project this is perfectly fine. However as the number of views grow, you might want to design a system for managing this stackpanel.

有一个旨在处理此类情况的库,您可以在此处找到它:http://compositewpf.codeplex.com/ 看看那个叫 RegionManager 的东西

There is a library designed to handle these kind of situations, you can find it here: http://compositewpf.codeplex.com/ look at the stuff called RegionManager

这篇关于如何设计一个多界面的wpf应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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