[英]What's the second-best way to make a skinnable user interface component?
I've been asked to make one of the components, which mimics a real-world appliance, in our application have a custom appearance, which varies depending on the make of the appliance being mimicked, so I need to make it skinnable. 我被要求在我们的应用程序中使模拟现实世界中的组件的组件之一具有自定义外观,该外观因要模仿的设备的品牌而异,因此我需要使其具有外观。
Now, I'm aware that the best way to do custom appearances in user interfaces, is not to do that at all; 现在,我知道在用户界面中进行自定义外观的最好方法是根本不这样做; but I don't think I'll be able to get that past management, so...
但我认为我将无法获得过去的管理权,所以...
What's the the second-best way to make a skinnable user interface component? 制作可换皮肤的用户界面组件的第二好的方法是什么? Our app is winforms-based so I was wondering whether it makes sense to use a
WebBrowser
control, write the skins in HTML, and somehow hook the DOM elements up to our app's events. 我们的应用程序基于Winforms,因此我想知道使用
WebBrowser
控件,用HTML编写外观以及以某种方式将DOM元素与应用程序事件挂钩是否有意义。 Should I do it that way, or is there a simpler (and free) way of doing it? 我应该这样做吗,还是有一种更简单(免费)的方法呢?
I would use WPF (Windows Presentation Foundation) or a skinnable component library like DevExpress (let's you design your own skins). 我将使用WPF(Windows Presentation Foundation)或可开发皮肤的组件库(例如DevExpress)(让您设计自己的皮肤)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.