How can you make a .net windows forms project look fresh?

前端 未结 7 1381
灰色年华
灰色年华 2021-01-31 16:33

I\'m working on a visual studio 2005 vb.net windows forms project that\'s been around for several years. It\'s full of default textboxes, labels, dropdowns, datagrids, datetime

相关标签:
7条回答
  • 2021-01-31 16:57

    I was actually just sprucing up a dialog today. A lot of it depends on what kind of application you have, and what OS it is running on. A couple of these tips will certainly go a long way to jazzing things up.

    1. Ensure adequate spacing between controls — don't cram them all together. Space is appealing. You might also trying flowing the controls a little differently when you have more space.

    2. Put in some new 3D and glossy images. You can put a big yellow exclamation mark on a custom warning dialog. Replace old toolbar buttons with new ones. Two libraries I have used and like are GlyFX and IconExperience. You can find free ones too. Ideally get a graphic artist to make some custom ones for the specific actions your application does to fill in between the common ones you use (make sure they all go together). That will go a long way to making it look fancy.

    3. Try a different font. Tahoma is a good one. Often times the default font is MS Sans Serif. You can do better. Avoid Times New Roman and Comic Sans though. Also avoid large blocks of bold — use it sparingly. Generally you want all your fonts the same, and only use different fonts sparingly to set certain bits of text apart.

    4. Add subdued colors to certain controls. This is a tricky one. You always want to use subdued colors, nothing bright or stark usually, but the colors should indicate something, or if you have a grid you can use it to show logical grouping. This is a slippery slope. Be aware that users might change their system colors, which will change how your colors look. Ideally give them a few color themes, or the ability to change colors.

    5. Instead of thinking eye-candy, think usability. Make the most common course of action obvious. Mark Miller of DevExpress has a great talk on the Science of User Interface Design. I actually have a video of it and might be able to post it online with a little clean-up.

    6. Invest in a few good quality 3rd party controls. Replacing all your controls could be a pain, but if you are using the default grids for example, you would really jazz it up with a good grid from DevExpress or some other component vendor. Be aware that different vendors have different philosophies for how their components are used, so swapping them out can be a bit of a pain. Start small to test the waters, and then try something really complicated before you commit to replacing all of them. The only thing worse then ugly grids is ugly grids mixed with pretty grids. Consistency is golden!

    7. You also might look at replacing your old tool bars and menus with a Ribbon Control like Microsoft did in Office 2007. Then everyone will think you are really uptown! Again only replacing key components and UI elements without thinking you need to revamp the whole UI.

    8. Of course pay attention to the basics like tab order, etc. Consistency, consistency, consistency.

    Some apps lend themselves to full blown skinning, while others don't. Generally you don't want anything flashy that gets used a lot.

    0 讨论(0)
  • 2021-01-31 16:57

    This depends on how the existing "gray old looking" project is structured in terms of code. For example, is data access code separated from the UI in a Data Access Layer, is the business logic in a Business Logic Layer? If yes, then cleaning the UI for a snazzy look should be relatively simple.

    If everything is all there in the "Button Click" event, then a rewrite is the only way in my humble opinion as otherwise it will just be too time consuming trying to work with the existing code base.

    Cheers

    0 讨论(0)
  • 2021-01-31 17:13

    I recommend purchasing a good 3rd-party control library - Infragistics and DevExpress, are just a couple. Most of these libraries give you the ability to drop in new compatible controls on top of your existing ones - for example, you can replace the default EditBox with an enhanced version. They also give you access to some of the snazzy new UIs such as Ribbon, or the Outlook-style navigator people are always wanting.

    The reason I specifically recommend using one of these libraries is that they were designed to be relatively easy to use in existing applications, you get support, a community, and all sorts of upgrade paths/options.

    The downside: money.

    0 讨论(0)
  • 2021-01-31 17:14

    You can subclass all the default controls and override their appearance. Admittedly, you will have to go thru the entire project and change all references of TextBox to MyTextBox, but all of the default properties and methods will still work. The same cannot be guaranteed if you go with a 3rd party vendor. The other advantage of this approach is you can pick one control at a time and perform an incremental upgrade of the application.

    0 讨论(0)
  • 2021-01-31 17:15

    One other thing to also check is that your controls have the FlatStyle property set to System instead of Standard.

    What this will do is make sure that the app uses the system defaults for radio buttons, standard buttons and the like. This takes all your apps from the flat Win 2000 look and gives them the XP or Vista bling depending on the OS they are running.

    0 讨论(0)
  • 2021-01-31 17:19

    This isn't so much an "answer" as an opinion.

    I tried to jazz up a WinForms project I created back a few years ago by giving the forms a fancy blue gradient background etc, and it looked pretty good on XP. But then on Vista it looked out of place. Taking away any custom painting and reverting the form to "battleship gray" made it look much better IMHO.

    I'm seeing a lot of applications (particularly from MS) coming out with custom window chrome etc, and all it does is detract from the nice sense of consistency that Windows gives.

    I guess what I'm saying is that you don't need to worry too much about making your application look fashionable. If you keep your colours based on the SystemColors enumeration then Windows can do that for you.

    0 讨论(0)
提交回复
热议问题