需要Wpf UI帮助 - 如何制作自定义WPF UI [英] Wpf UI help required - how to make custom WPF UI

查看:77
本文介绍了需要Wpf UI帮助 - 如何制作自定义WPF UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到有人长时间回来做WPF UI。不能现在问他。不知道他在哪里,甚至没有我的代码。



他做的是删除WPF Window的边框,他创建了WPF的自定义句柄窗口客户区。



他使用所有标准菜单和按钮(如最小化,最大化和关闭窗口)全屏启动应用程序。



然后他有了孩子Dialogs。他正在使用某种堆栈在子对话框中进行子对话。可以看到在层次结构中绘制的另一个对话框的对话他使用Stack来存储对话框信息和有关它们的数据。



他还创建了自定义消息框,不知道如何...



有人可以告诉我..



1.他是如何使用Stack在一个窗口内处理Dialogs的。

2.他如何处理窗口,对话框和消息框等事件,这些事件就像本机窗口一样工作。

3.附图像...



如何在WPF中完成所有这些工作..



这里有一些想法他做了什么

[ http://i65.tinypic.com/311t26c.jpg ]



有人能说出来吗?



网上有没有这样的项目代码,或者有人可以共享?



请帮帮忙?



我的尝试:



我什么都不知道。想试试..

I seen someone long time back doing WPF UI. Cant Ask him now. Dont know where he is and even dont have that code with me.

What he did was remove the border of WPF Window, and he created custom handle out of the WPF window client area.

He launched the application fullscreen with all Standard menus and buttons like Minimize, Maximize and Close Window.

Then he was having child Dialogs. He was using some sort of stack for doing child dialogs inside child dialogs. One can see dialog over another dialog drawn in hierarchy. He was using a Stack for storing the dialogs info and the data regarding them.

He also created custom Message Boxes dont know how..

Can someone tell me..

1. How he was handling Dialogs inside one window using a Stack.
2. How he was handling events for windows, dialogs and messageboxes etc which were working just like the native windows stuff.
3. Image attached..

How to do all these stuff in WPF..

Here is some idea what he did
[http://i65.tinypic.com/311t26c.jpg]

Can someone tell?

Is there any project code like this available on web or if someone can share?

Please help?

What I have tried:

I dont know anything about it. Want to try it..

推荐答案

你知道WPF并提出这个问题吗?窗口处理在WPF中与其他Windows UI技术没有什么不同......但听起来你对WPF了解不多,是吗?所以我想你可能有点难以理解任何答案......

例如我在我的WPF项目中使用纯MVVM方法,因此我需要抽象处理(UI-Tech所有这一切都没有意识到。对话框,消息框,Windows, - 有很多不同的方法 - 可能在Internet上搜索MVVM + WPF +对话框

如果你不使用MVVM模式,并使用WPF之类的WindowsForms - 必不可少的窗口处理仍然是相同的..当然你可以使用Panels,ChildWindows(Silerlight?),PopUp Controls等模拟对话框...这是WPF的主要问题(至少对我来说) - 百万种方法做事,我怕你必须找到自己的!



如果我看你的例子照片。我没有看到正常的Windows / Dialog处理无法做到的任何事情,我只是关于设置窗口样式的问题,也许还有一些额外的代码(例如),如果你使用没有标题栏的Windows并希望将它们移动到你周围必须添加一些处理程序(MouseDown,MouseMove,...)。多数民众赞成......
So you know WPF and aks this questions? Window-Handling is not different in WPF than in other Windows UI technology... But it sounds you don't know much about WPF, do you? So I guess it could be a little hard for you to understand any "answer"...
e.g I use "pure" MVVM aproach in my WPF Projects, therefore I need abstract handling (UI-Tech unaware) for all of this. Dialogs, Messageboxes, Windows, - there are a lot of different approaches to this - maybe do a search on Internet for MVVM+WPF+Dialogs
If you don't use MVVM pattern, and use WPF like WindowsForms - the essential window handling is still the same.. Of course you could simulate dialogs with Panels, ChildWindows (Silerlight?), PopUp Controls etc... Thats the main Problem with WPF (at least for me) - a million ways to do things, I fear you have to find your own!

If I look to your example pic. I don't see anything that is not possible with normal Windows/Dialog handling, I't just a matter of styling your window, and maybe some little additional code (e.g.) if you use Windows without titlebar and want to move them arround you have to add some handlers (MouseDown, MouseMove, ...) to it. Thats all...


这篇关于需要Wpf UI帮助 - 如何制作自定义WPF UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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