How to Create Great Looking Buttons in .Net? - c#

I work on C# window 05 and I want to create some great looking buttons like Vista's theme buttons, Animated buttons, or like any custom of VS05 buttons....
How can I create custom buttons like this on window platform?

Buttons are just Controls that respond to mouse clicks. One way would be to create your own User Control in VS05 and have your frames ready as bitmap files to load at program launch. Then subscribe to your Control's mouseOver and mouseClick events to change what image is painted on your Control at that time.

Third party libraries like Infragistics and DevExpress have lots of cool controls and some nice themes. You just need to set some property to make a button look like a Vista button. But you will have to purchase these libraries. They also offer some trial downloads.

Related

Add text below icons

Some apps have the ability to show or hide an icon's name right under the icon in Windows 10 Mobile. The text's visibility is toggled when the user clicks on the 3 dots beside the icons - Photos, OneDrive, Outlook,...
Is that done by some ui element property or some other built in way, or was it just written to behave the same from scratch? My goal, of course, is to add that to my app.
I am assuming you are talking about the Command Bar control
You can read more on how to customize the AppBar in the official documentation

How can I send the Windows Form element to behind in wpf application?

Hy!
I create a WPF application. I have a Windows Form element. This control displays the WebCamera picture.
I put it in canvas, 'cause I have to show the recodring time, so I also put a textblock into the canvas. My problem is that, I've already done everything with the From control, for example I set the ZIndex etc., send back, but the WebCam image always the highest lay. I cant send it behind. This element is a System.Windows.Forms.Integration.WindowsFormsHost
Can anybody help me? I hope I could write my problem understandable.
That's not possible. WindowsFormHost is HwndHost, and according to MSDN
HwndHost will appear on top of other WPF elements in the same
top-level window. However, a ToolTip or ContextMenu generated menu is
a separate top-level window, and so will behave correctly with
HwndHost.
Consider following options:
adding overlay controls to WinForms control
placing your overlay WPF controls inside a Popup window (you'll have to handle that window location manually)
look for a WPF control alternative for your WinForms control (or implement your own)

what are controls .NET equivalent to this image?

in this picture,I can see: MenuStrip,??,TextBox
how do I an bar like this that have the enumeration?
I hope this clear. Thanks in advance.
If you're talking about the menu bar at the top of the window (just below the caption/title bar, which you should get for free from any Form object), then that is not a MenuStrip control.
The MenuStrip control doesn't use the native Windows menu bar, which means it's going to look very different on Windows Vista and later where the appearance of the standard menu bar was altered to be blue and plasticky. Since MenuStrip is drawn entirely in C# code, it's going to look permanently cheesy and stick out like a sore thumb.
If you want the standard Windows menu bar, you need to use the old MainMenu control. This is what everyone used back in the early days of .NET, but it's still available for backwards-compatibility and for people who care about what their apps look like. You'll probably have to add it to the toolbox manually because it's not there by default. Right-click on your toolbox and click "Choose Items", then find MainMenu in the list of available controls and ensure that it is checked.
As Blorgbeard suggested in the comments, if you're talking about the line numbers and the text editing control, they're not the standard TextBox control, either. In fact, they're not a standard Windows control at all. That's a custom control designed specifically for editing code, probably Scintilla.
You can find a .NET implementation here: http://scintillanet.codeplex.com/

C# Volume mixer like buttons/combo boxes

How would you get a button to look and perform similar to that of the buttons in the volume mixer on Win7?
What I mean is that in the volume mixer there are icons that doesn't look like buttons until you hover them, they also haven't got the standard blueish color when hovered.
So far I haven't found a way to do this directly in visual studio.
I'm guessing that creating a custom user control is the only way to go, but I've had no luck so far, I would appreciate some examples.
In addition, there are also combo boxes in the volume mixer I would like to duplicate. They're hidden except for the text and arrow until they're hovered.
Is there a way to accomplish this?
(Here an image that might help explain what I mean:
http://i53.tinypic.com/2ij409u.png)
For windows application, (and also how they did win7), they used the technology called WPF. I am not specifically answering how you can do this, because in WPF, this is the fundamental that defining skin (via markup called XAML) without touching the implementation code. If you are serious in learning how to do that, I suggest you look for tutorials or good book about WPF.
Here's one of the markup looks like for a button. To modify the button's look, what you need is to define it's XAML, and you don't have to inherit it in the code. The example looks scary long, but Visual Studio could help you.
You could use a third party control library, for example Krypton Toolkit, its free!
There is quite a terrific solution for this button quest. You can paste pictureBoxes on form and handle MouseUp, MouseLeft and MouseDown events. When each of them fires, you need to set specific image (one of tree, in fact) - normal picture, picture of "highlighted" icon and picture of pressed icon. But that's really a hard and useless work, so better don't.
If you need several of such "buttons" in a panel, I remember, I once managed to get the same behaviour by using toolStrip with buttons.

How to create UI similar to file replace dialog in window 7 using C# Windows Forms?

I need to create a dialog that allows user to choose between several rather complex actions. I really like the usability of the windows 7 file replace dialog and I think it would suit my needs very well. Here's a screenshot for reference:
Is it possible to use the controls that were used for windows dialog? If not, how would you recommend creating UI similar to this dialog?
Seems like this could easily be done with a window containing a few labels for the text and three custom controls - with some images for the arrows and file icons - each of which changes their background image when the user mouses over them - and fires an event the window picks up on when they are clicked. Fairly standard WinForms stuff.
Is there a particular part of the process you need some extra help with? Like, for example, the mouse over?

Categories

Resources