垂直文字& C#中的标签 [英] Vertical Text & Labels in C#

查看:93
本文介绍了垂直文字& C#中的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的应用程序中,我使用垂直文本作为按钮背景。

为了方便起见,我正在使用背景图像这样做..

但是现在,我正在使应用程序多语言,我不想为每种语言设计不同的图片..

我希望将它作为文本存储在语言文件中,

建议在运行时绘制垂直图片吗?它会影响性能吗?

解决方案

嗯,是的。当然,在运行时将文本绘制到图像中比从文件/资源​​加载文本需要更长的时间。但可能不是很大,你总是可以通过将绘制的图像保存到文件并在下次加载它们来使其成为一次性开销。当你想将它们分配给控件并将它们存储在那一点时,你也可以按需创建它们 - 这会将负载分散到应用程序上,而不是在你创建它们时延迟启动,如果这是一个问题。 / BLOCKQUOTE>

Hi,
In my application I am using, vertical texts as button backgrounds.
For easiness, i am using Background Images to do so..
But now, the I am making the application multilingual, and I dont want to design different pictures for each language..
and I want to store it as text in language files,,
Is it advisable to draw the vertical picture at the run time ?? Will it affect the perfomance ?

解决方案

Well, yes. Of course it will take longer to draw text into images at run time than to load it from files/resources. But probably not a significant amount, and you can always make it a "one off" overhead by saving the drawn images to file and loading them next time. You could also create them "on demand" when you want to assign them to the control and store them at that point - which would spread the load over the application rather than delaying startup while you create them all, if that is a problem.


这篇关于垂直文字& C#中的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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