表格上的大量控件...... [英] Large number of controls on form...

查看:57
本文介绍了表格上的大量控件......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题需要解决......

似乎最快的(在开发时)解决方案是在某种形式上放置大约1000个小控件。有没有人在WinForm或WPF上有一定数量的控件经验?

我想听听它...

I have a problem to solve...
It seems that the fastest (in development time) solution is to put about 1000 tiny controls on some form. Anybody had some experience with that amount of controls on WinForm or WPF?
I would like to hear about it...

推荐答案

认真地?不要,如果你可以避免它。

我看到两个主要问题:

1)使用该死的东西。你想尝试找出你在那里看到的东西吗?即使你在表单上放了十个控件,那仍然是100行的东西!你会得到很多沮丧的用户......

2)命名:开发真的会更快吗?当你最终得到button732和button841时,编写它时你想要在你的代码中使用它并不容易,更不用说当你必须进行更改时。



显然,我不知道你的应用程序,但是你不能至少把它们分成重复的块并使用UserControls或标签页吗?
Seriously? Don't, if you can avoid it.
I see two major problems:
1) Using the damn thing. Would you want to try and work out what you are looking at there? even if you put ten control across the form, that's still 100 rows of the things! You are going to get a lot of frustrated users...
2) Naming: is it really going to be quicker for development? When you are going to end up with "button732" and "button841" it's not going to be easy to work out which you meant to be using in your code when you write it, much less when you have to make changes.

Obviously, I don't know you application, but can't you at least group them into repetitive blocks and use UserControls, or tab pages?

这篇关于表格上的大量控件......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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