ASP.NET 是否内置了对皮肤徽标的支持?
我仅使用徽标作为示例。
我第一次尝试在 ASP.NET 中使用主题/皮肤,只是想弄清楚它们到底能让我做什么。
据我所知,主题主要用于更改按钮等控件,可以使用图像进行修改。 但是有没有办法可以使用主题为“徽标”或其他图形换肤? 阅读文档后我无法立即找到这样做的方法。
I'm using logos as just an example.
I'm trying to use themes/skins for the first time in ASP.NET - and just trying to figure out exactly what they will allow me to do.
As far as i can tell themes are primarily for changing controls like buttons, which can be modified using images. But is there a way I can skin a 'logo' or other graphics using themes? Reading the documentation I couldnt immediately see a way of doing so.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用主题/皮肤轻松设置图像/徽标。 例如,如果您有这样的图像控件:
在您的皮肤文件中,您可以指定要显示的图像,例如在 App_Themes/theme1/logo.skin 中:
在 App_Themes/theme2/logo.skin 中:
这不限于ImageUrl 属性。 您可以从外观文件设置控件的大部分属性。
You can easily set an image/logo using themes/skins. E.g. if you have an image control like this:
In your skin files, you can then specifiy the image to be displayed, e.g. in App_Themes/theme1/logo.skin:
And in App_Themes/theme2/logo.skin:
This is not limited to the ImageUrl property. You can set most of the properties of controls from skin files.
我最近使用 ASP.net 主题创建了一个动态品牌网站,其中包含不同的徽标和其他图像,具体取决于将用户发送到该网站的附属机构。 这听起来像是你想要的。 为了实现这一目标,我执行了以下操作:
I recently used ASP.net themes to create a dynamically branded site with different logos and other images depending on the affiliate that sent the user to the site. This sounds like what you are going for. To accomplish this, I did the following:
使用主题,您可以轻松地将图像 ASP.NET 控件的源设置为每个主题都不同。 (如果尺寸不同的话,还有尺寸)。
主题概述:http://msdn.microsoft.com/en-us/library /ykzx33wh.aspx
using the themes you could easily set the source of an Image ASP.NET control to be different per theme. (also the sizes if they were different).
Themes overview: http://msdn.microsoft.com/en-us/library/ykzx33wh.aspx