如何使用户自定义软件外观/GUI? [英] How to make a user customize a software skin/GUI?

查看:76
本文介绍了如何使用户自定义软件外观/GUI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想让用户在自己维护的软件的一个屏幕上自定义.用户可以设计其页面,然后将其加载到软件中以使用它.

该软件是MFC/C ++应用程序,并且已经完成了重要的开发工作.所以我不能重新开发它.我阅读了有关代码项目的几篇文章.事实证明,有两种选择可以实现这一目标:
-WPF(首选)
-HTML
现在的问题:
1)如何在MFC应用程序中动态上载xaml页面(WPF)?
2)然后如何使用WPF在屏幕上显示此xaml页并管理用户操作?我想避免对用户进行任何重新编译过程.

谢谢答案,非常感谢Code Project团队.保持这份好工作.

/P.

Hi,

I''d like to let users customize at their own one screen of a software I maintain. The user would design its page, then load it in the software to use it.

The software is a MFC/C++ application, and a significant development job has been done => so I cannot redevelop it. I read several articles on the code project. It turns out 2 options are interesting to achieve this:
- WPF (prefered)
- HTML
Now the questions:
1) how to dynamically upload a xaml page (WPF) in a MFC application?
2) then how display this xaml page at the screen with WPF and manage user actions? I''d like to avoid any recompilation process to the user.

Thx for answers, and many thanks to the Code Project team. Keep up this good job.

/P.

推荐答案

由于您的应用程序是使用MFC/C ++开发的,因此我认为您的两个选择都是不可行的,可能可行,但可能不值得-假设您不准备重写应用程序.

您可以做的是使用通常与HTML关联的一些技巧,例如对位图资源进行9切片划分,以基于位图资源实现UI呈现功能.

如果您是 http://www.uracer.org/ [ cs-script [ ^ ],以便在实现功能所需的幕后动态创建代码.

WPF图表设计器:第1部分 [WPF图设计器-第4部分 [
Since your app is developed in MFC/C++ I would consider both your options as a no go, possibly doable, but probably not worth it - assuming that you are not preparing to rewrite the application.

What you can do is to use some of the tricks usually associated with HTML, like 9-slice devision of bitmap resources to implement UI rendering functionality based on bitmap resources.

If you are the guy behind http://www.uracer.org/[^], then I''m pretty sure you can take it from here.

Possible answers to your questions:
how to dynamically upload a xaml page (WPF) in a MFC application?
then how display this xaml page at the screen with WPF and manage user actions?

Host .Net in your MFC app, use cs-script[^] to dynamically create code behind the scenes required to implement your functionality.

Take a long look at this series, starting with WPF Diagram Designer: Part 1[^] and ending with WPF Diagram Designer - Part 4[^] - deals with user interaction and WPF.

Regards
Espen Harlinn


感谢您的回答Espen.这些都是非常好的文章.我在这里也找到了有趣的代码项目代码示例:
WPF主题和外观引擎 [
thanks for your answers Espen. These are really good articles. I found also interesting code project code example here:
WPF Themes and Skins Engine[^]

> If you are the guy behind http://www.uracer.org/
Yes. Why?


如果您对此项目感兴趣,可以给我发送电子邮件至support@uracer.org.

Kaxaml似乎是一个很好的免费xaml编辑器(当然,VStudio编辑器除外).是否有其他用户友好的xaml编辑器可用于构建wpf皮肤包? ;)
if you''re interested in this project u can email me at support@uracer.org.

Kaxaml seems to be a good free xaml editor (except VStudio editors, of course). Are there any other user friendly xaml editor available to build wpf skin packages? ;)


这篇关于如何使用户自定义软件外观/GUI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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