This might be an easy one to answer as I'm probably just Googling for the incorrect search terms.
I'd like to change the visual appearance of my application to look more like the interface of Visual Studio 2013. Now with VS you can choose between three color themes (blue, dark and light). I'm trying to Google for ways that I can give my application that sort of look but any search for "theme" or "color theme" results in plenty of hits for how to choose a different color theme for VS.
I'm not so much interested in the colors as such but more the "flat" appearance for lack of a better word. Notice how my application has the standard Windows frame, standard minimize, maximize and close buttons at the top right and how the form's title bar, menu strip and tool strip are all different colors. On the Visual Studio UI, these are all one color and so appears to form a single unit. I also like how the form doesn't have any more border around it than is really necessary. The form basically consists of a "header" at the top (combined title bar, menu strip and tool strip) and a status strip at the bottom. Between those there is nothing but usable real estate, no silly border around the edge.
Is there an easy way to achieve this for my own applications?
This isn't possible with WinForms.
It's possible, but really really hard to achieve and not recommendable.
You need Windows Presentation Foundation.
Why?
First of all you need hardware acceleration. The UI in WPF is DirectX rather than GDI+ (WinForms) so it can make use of the acceleration and processing available in DirectX, and work in 3D.
Visual Studio it self is build with WPF.
If you want a fresh modern Look for your WinForms Application i would recommend Metro for WinForms (WinForms on steroids).
You also should look at ComponentOne Studio WinForms Edition. Maybe one of the 25 designed themes for WinForms suits you.
You need to use WPF for the same
https://msdn.microsoft.com/en-us/library/ms754130%28v=vs.110%29.aspx
https://visualstudiogallery.msdn.microsoft.com/7a4362a7-fe5d-4f9d-bc7b-0c0dc272fe31
For Screenshots:
https://github.com/firstfloorsoftware/mui/wiki/Screenshots
Related
I am new to Creating WPF GUI Applications.
I am a Mid Level Programmer. I dont have any idea or knowledge about the Graphics Development.
I would like to know how do I use the UI Elements designed in Photoshop in my WPF Application.
Eg: I would like to replace the default textbox or the button in WPF with the button or textbox designed in Adobe Photoshop.
Last Information:
I am using Expression Blend 4.
Any Help Would Be Appreciated, Thanks
Starting with WPF
I personally work with a combination of Microsoft Visual Studio (environment) and Microsoft Expression Blend (elements editing).
Blend is a WYSIWYG front-end for designing XAML-based interfaces for WPF and Silverlight applications, and it's good for templates, visual states, and animation.
Editing Templates
If you are working with templates, a nice tool is WPF Theme Editor by DevExpress. It integrates with Blend, and the tree browser and template hierarchy are very useful for locating styles.
One thing you'll always find helpful is access to the actual structural templates for the elements. I usually find myself visiting the DevExpress WPF Controls website, which has a very comprehensive list of libraries and controls.
The Demo Center for DevExpress is also a great downloadable app for extracting and editing templates. I find it particularly useful with complex elements like charts (not included in Blend), where you can toggle the visibility of elements and then move the code to your dev space.
Creating Graphics
For working with graphics themselves, I found Microsoft Expression Design to be quite good for drawing and exporting vectors into png, WPF or Silverlight formats. It has a nice simple set of tools, and you can import elements from vector. Also, version 4 is free.
Testing
I just discovered this nice tool for testing live called Snoop. It's open source, and it allows you to spy/browse the visual tree of a running WPF application (without the need for a debugger), and change properties live.
For all of these you will probably need at least a basic knowledge of how to write/read WPF. I personally use all of the previous and write custom styles for custom elements.
In a legacy product we used Sheridan controls to produce buttons that looked like this:
Is this style of button available in C# using VS2005?
The way buttons looked over the history of GUI development was affected heavily by machine capabilities. It all started with simple rectangles back in the late eighties, back when operating systems were 16-bit and video adapters could display only 16 colors. The 3-D style became vogue in the nineties, Sheridan was an early pioneer and was widely copied. Threed.ocx was a Microsoft library to get this styling. Empowered by video adapters being capable of 256 colors and enough horse power to draw the beveled edges. Some remnants of it persist in Winforms through the BorderStyle property.
By the time Winforms started, early 2000's, video adapters could display 16 million colors and elaborate gradients became the vogue. Clearly visible in the default style of a Winforms button as well as controls like ToolStrip and StatusBar. And Windows visual style themes. A significant disadvantage of this styling is that it cannot easily be overridden. Winforms has four distinct button renderers (note the FlatStyle property), they are all private classes that cannot be overridden. They are too elaborate to easily expose.
This has gone full circle, we are now back to simple flat rectangles. Very noticeable in the default styling for WPF buttons and the Metro theme in Windows 8. No longer affected by machine capabilities but (possibly) the limitations of CSS, the language used to give web pages their styling. Winforms supports it too through the FlatStyle and FlatAppearance properties.
Trying to resurrect the 3-D style is not so easy, you'll have to create a custom button control from scratch with ButtonBase as the base class. And override OnPaint() to draw the button the way you want it. It is pretty questionable whether you should even try, the 3-D style is definitely out of vogue and too strongly associated with old programs that stopped being maintained. Not the kind of association you'll want in a new program.
If you want the buttons exactly like that have you considered using images for the buttons? That way you just simply take an image of that style and make it into a button. You get all the functionality of a button but you also get it to look like you want it to.
A lot of them have hard coded square small and 2 squares sized large tiles. I am looking for something flexible enough for at least the size ratio to be adjustable to be more flat.
Telerik has a flexible approach (you can choose any row and column span for a tile) but their implementation is either laughably primitive is still too new, especially the drag and drop part.
Devexpress has nice drag and drop, but is stuck doing 1x1 and 1x2 sized tiles.
DevComponents is my favorite. With WPF, you can copy most of the XAML you would otherwise use in a Metro application - so don't feel that you can't emulate Metro on the desktop. Many have already done it. Certainly, many more will.
But there are some downsides to Desktop development. Although desktop development is very powerful, and it is, Metro development in Windows 8 has considerable advantages. Having said that, desktop development can take advantage of Visual Studio 11, too.
I'm using the Devcomponents DotNetBar. It has pretty flexible Metro tiles.
metro-ui should be used with WPF and that will work great there too.
If you want to implement Metro-UI in windows from you have to create your own user control.
Does anyone know some good guides on making Ribbons that actually look good like the one in Office 2010?
Preferably non-Microsoft guides since I've read several already and wasn't too thrilled with the results or ease. Some things in particular that I've never seen replicated are the semi-transparent deselected tab headings, good high DPI scaling, and smooth window resizing, etc. Little things like that make or break the program!
I'm using the Windows Ribbon for WPF (October 2010) / Windows 7 / .NET 4
Here are some options to look into:
DevExpress Ribbon
CodeProject Ribbon Wrapper
Ribbon API
I'm using WINFORMS not WPF.
I just know basic c# .net gui programming. I donot want the traditional windows look. I want to have my own custom look (eg. gtalk, antivirus softwares, media players, google chrome).
Actually I'm inspired by google's PICASA software. Its awesome. I want to do something like that.How can I do that? If there is something I should learn please point me.
Also I may have to write my own custom controls (like modified tree view etc..) I guess. Please give some good learning resources.
This article describes how to draw custom windows. The author also shows how to draw non-rectangular windows.
If you could use WPF instead of Windows Forms, this is a good article about customizing window drawing:
http://www.codeguru.com/csharp/.net/net_wpf/article.php/c16379/
There is also a question with some good answers here on SO:
Creating custom forms in WPF?
Update:
I think that skinning and custom drawing is fun to do from a programmers perspective, but I also think that there is almost no benefit for the user.
The creators of the platform you are developing for might have put a lot of effort into the design of their windowing toolkits.
If you just want to change some visual aspects of your application you also should take into account that you might miss some important other aspects of UI design:
consistency
accessibility
aesthetics (if you are overdoing
effects, gradients, ...)
internationalization
...
As you are developing for Windows, you also lose the skinning ability of the OS itself. And I think that some of the skins that come with newer versions of Windows are pretty good.
You can try any of the following:
telerik
Syncfusion
(source: componentsource.co.jp)
Or other components.
They do make your UI pretty.
Edit: if you want to study how they do it, you can buy the source code-- along with documentation and understand from there.
There are some commercial control libraries available.
I can recommend the Krypton Suite. It consists of the free Krypton Toolkit (which contains a lot of skinnable controls) and other non-free controls (Navigator, Ribbon, Docking, Workspace). It has some built-in palettes and renderers that allow you to make your UI look like Office 2010, Office 2007, Office 2003, ...
You want to look for +winforms +skinning. I haven't tried these, but the first hits don't look bad. Most decent skinning tools will be paid for.
From what you said, you want to develop your own custom controls. You have some frameworks for this like Qt which can use Direct3D for hardware accelerated graphics. It also have a Visual Studio plugin. There is a free LGPL version and a commercial version of it.
I remembered about Qt because you mentioned Picasa and as far as I remember, I heard the Picasa UI has been written through Qt.
You can try using "SetWindowRgn(..)" to set an arbitrary region for your window. This may range from giving a rounded rectangle shape to giving a weird looking shape to the form!
Check this out: Link.
There is another option if you are working in Vista(aero enabled), ie you can check out DwmExtendFrameIntoClientArea(..) function here: link text
You can set the form's border style to 'none' and go on to create your custom form! You then might have to create custom buttons to carry out tasks like close, minimise, maximise etc. You might even need to write code for drag and drop events..
For the background, you might need to have a look at the gradient fills to give a great effect, otherwise you can use great looking pictures as Background..! But the latter option isnt good unless you have really good pic.