I am working on .NET 2.0 with C#. I am using Form Border Style as "FixedToolWindow".
I am not able to add icon with this property.
Is it possible to add icon with this property? If so, give me a solution.
Tool windows don't use icons.
For a similar style, you could set the window style to FixedSingle and disable the Min/Max buttons instead.
No. Windows does not draw an icon for FixedToolWindow. There are other options including drawing your own window, but that could be tedious.
Related
Is it possible to remove the border of a standard C# Button ? I know that I could set the FlatStyle property to Flat and customize the FlatAppearance property to hide the border but I would prefer to use the Standard property to ensure that the control appears under all operating systems like a default Button. Did you have any suggestions how I can solve this issue? I am working with a Windows Forms Application.
You could use an image and make it clickable, that is one way to avoid the borders, but there are several options. Good luck!
If you are using windows forms and trying to implement Flat UI, Material UI, Metro-Looking controls, you're in hell. It is has limited properties for customizations unless you know how to work with Graphics and Animation. You'll have to use imagebox or picture box and dynamically change its image on different events.
I'll suggest WPF or Windows Presentation Foundation for a more customizable User Interface.
I had to change the color and icon of the title bar, so I used custom window. But in this way, I have to create my own window control buttons(minimize, maximize, restore, close). I want to use the native ones like the thing that Microsoft Office and Google Chrome did. How should I do?
Office
Chrome
There is no easy way to just use the default chrome buttons as-is in a custom window I am afraid.
But you could quite easily create your own ones using the Segoe MDL2 Assets font:
What is the font family of the close/minimize/reduce button in Windows 10?
Show default window buttons on WPF Window using WindowChrome
I want to add an icon to the WPF window titlebar, but my icon is a bit wider than the fixed size of the icons accepted by the titlebar (16x16) Is there any way to add a wider icon to the titlebar?
This is not possible, because Windows handles the standard window chrome. You have to do a custom window and replace the chrome. For example this or look at this.
I am creating a popup dialog using microsoft's WPF.
The thing is that this popup must support two or more different styles, for instance, depending on how it is called the popup must have a red background and white text in the foreground, or it must have a white background and gray text in the foreground.
What I would like to do is create as many styles as necessary in my xaml file and just choose each of them depending on how the popup was created, therefore I would like to know if it is possible to create something like this (kind of a dynamically applied style) inside the .xaml file, or if it is better to just do this programatically in the code behind.
Also please note that I am using the Visual Studio 2010 with the .NET Framework 4.0.
Thanks,
Felipe
I would define an enumeration that names the styles, then either use DataTriggers to set the style on the control from a wrapping border.
I see that many applications do not have a title bar, but still have the window controls in the upper right corner. These are also styled differently than the normal windows form controls. Is it possible to achieve this effect in WPF?
Here are some examples:
Zune Desktop software:
http://i548.photobucket.com/albums/ii356/elpedrogrande/btns2.gif
Photoshop:
http://i548.photobucket.com/albums/ii356/elpedrogrande/btns3.gif
GoTo Assist:
http://i548.photobucket.com/albums/ii356/elpedrogrande/btns1.gif
They do this by setting the window style bits so it is created without a title bar. And then draw their own, making it look like a custom one. Which is the main reason that all these programs have caption glyphs that are not identical.
You'd accomplish the same in WPF by setting the WindowStyle to None. And a whole bunch of code to get back the behavior that Windows implements automatically with the title bar. Google "WM_NCHITTEST" to find out more.