By default, Windows shows the a thumbnail of the whole window as preview in the taskbar. I want to replace the default thumbnail by a custom drawn replacement. How can I do it?
I found TaskbarItemInfo.ThumbnailClipMargin, but this property can only cut the thumbnail. I want to show a completely different content (in my case some TextBlock controls). I'm using .NET 4.5 for my WPF application.
Related
I need to use a blinking icon as an image for a specific item in a tree view. For this, i tried to add an animated gif file including two frames, one including the image and one an empty frame. I could add the image to the image list in designer. But it doesn't blink. I tried to figure out what's the problem, but i couldn't.
Any idea?
Default Windows Form does not support any animation, that's why gif file look like static image, when we use it in windows forms. If you are using windows form, then use timer control to redraw the treeview. Or use integrated wpf content in windows form(my choice)
I have a window application that has a window form. I have to change this window form header text (Font Size and Font family etc). I am unable to do this. I am attaching an image for better understanding.
You can do this via the Style Libraries in the Custom Border Form project on CodePlex.
There are currently three skins available: Longhorn, Vista, and WMP. There are some demo usages as well on the site.
Alternatively there is also WinForms SkinFramework available on CodeProject.
The problem lies in the fact that WinForms is a managed wrapper around the native Windows UI elements. So the font and other styling is ultimately controlled via the Operating System theme (Aero in this case).
I have a WinForms application. All ToolTips are appearing too far below the hovered controls. It happens on tool bars and menus.
I think the reason is that form's font is changed. It is MS Segoe UI 9px.
Is there a solution to move ToolTip to its default place in general for the whole app?
The screen shot is on Windows 8 "Segoe 9px" font. 100% font scaling. The issue appears on other DPI settings and on other windows versions also.
Edit
I compared ToolTip position of my app and VS2012 and Chrome. In my app, ToolTip appears one cursor height below the bottom of the cursor. In VS2012 and Chrome, ToolTip appears one cursor height below the hot point of the cursor (about 2 pixels below the cursor).
Cursor not visible in screen shots:
Edit 2
I checked other winforms apps with default font settings. The ToolTip also appears one cursor height below the bottom of the cursor. It seams this is the default position for winforms. However it doesn't look well compared with other software.
It looks like it can be fixed only with overriding the default ToolTip behavior.
Default tooltip in winforms toolstrip have several problems. I've built custom toolstrip that has custom tooltip available at http://www.codeproject.com/Articles/376643/ToolStrip-with-Custom-ToolTip. I am not 100% sure whether it will solve your problem out of box, but you can fully customize how tooltip appears by altering code.
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 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.