windows-themes

How to inspect Microsoft.Windows.Themes

假如想象 提交于 2019-12-24 19:22:26
问题 It's no secret that wpf exposes it's default themes , for example here's a shortened version of how a checkbox template looks xmlns:theme="clr-namespace:Microsoft.Windows.Themes" <ControlTemplate TargetType="{x:Type CheckBox}"> <BulletDecorator> <BulletDecorator.Bullet> <theme:BulletChrome /> </BulletDecorator.Bullet> <ContentPresenter /> </BulletDecorator> </ControlTemplate> gee .. that's great and most help full (NOT!) i actually wanted to see how the check mark path looks like , is there

How can I tell what windows theme I'm using?

て烟熏妆下的殇ゞ 提交于 2019-12-23 16:38:38
问题 I'm trying to make my application force a theme - this is straightforward as shown here: http://arbel.net/blog/archive/2006/11/03/Forcing-WPF-to-use-a-specific-Windows-theme.aspx However, I don't know what theme I'm using now. I'm using the Windows XP default theme, whatever that may be. That article says It's important to specify the version and the public key token ...where do I get that information? 回答1: To get the theme name you can call the unmanaged GetCurrentThemeName method: public

Is there a list of valid parameter combinations for GetThemeColor / Visual Styles API

我的未来我决定 提交于 2019-12-07 02:27:25
问题 I am trying to retrieve the background and text color of the taskbar and/or my applications main window. It turned out, that Windows 7 does not return the correct colors. If i i.e. switch to a pink theme, Windows 7 still returns light blue for window caption although thats not true. This happens using GetSysColor(COLOR_ACTIVECAPTION); as well as using HTHEME hTheme = OpenThemeData(hwnd, L"WINDOW"); HRESULT result = GetThemeColor( hTheme, WP_CAPTION, CS_ACTIVE, TMT_FILLCOLORHINT, &color);

Windows 10 Close, Minimize and Maximize buttons

孤者浪人 提交于 2019-12-04 11:37:02
问题 to paint themed button I use this code: var h: HTHEME; begin if UseThemes then begin SetWindowTheme(Handle, 'explorer', nil); h := OpenThemeData(Handle, 'WINDOW'); if h <> 0 then try DrawThemeBackground(h, Canvas.Handle, WP_CLOSEBUTTON, GetAeroState, ClientRect, nil); finally CloseThemeData(h); end; end else DrawFrameControl(Canvas.Handle, ClientRect, DFC_CAPTION, DFCS_CAPTIONCLOSE or GetClassicState) end; This code works fine but painted button looks like from Windows 7 theme, even on

Windows 10 Close, Minimize and Maximize buttons

本秂侑毒 提交于 2019-12-03 08:22:50
to paint themed button I use this code: var h: HTHEME; begin if UseThemes then begin SetWindowTheme(Handle, 'explorer', nil); h := OpenThemeData(Handle, 'WINDOW'); if h <> 0 then try DrawThemeBackground(h, Canvas.Handle, WP_CLOSEBUTTON, GetAeroState, ClientRect, nil); finally CloseThemeData(h); end; end else DrawFrameControl(Canvas.Handle, ClientRect, DFC_CAPTION, DFCS_CAPTIONCLOSE or GetClassicState) end; This code works fine but painted button looks like from Windows 7 theme, even on Windows 8 or 10. This is possible to paint the Close button using Windows 10 or 8 theme? One of ways to

Clicking a control and causing it to shade

拈花ヽ惹草 提交于 2019-11-30 19:37:33
问题 In windows when you click on an icon on your desktop, the icon darkens with a shade that is based on your windows theme that is currently used. I have a custom control that displays an image. I would like to have the same functionality as the windows icon click. How do I obtain the same result in WinForms by selecting my custom control? 回答1: Windows implements alpha-blending for selected icons since Windows XP. If you want to achieve similar look you must draw your image with alpha blending:

Get Windows theme?

不打扰是莪最后的温柔 提交于 2019-11-28 12:50:34
I must really know which Windows theme my user is using. More precisely, Classic, XP, Basic or Aero. (Basic theme as in Vista/7 Windows Basic theme) I already know how to find if it's aero, but how about the others? The answer can be in any .NET language (C#, VB.NET or C++). If you really have to know why on Earth I need to know the theme then here you go: I have some floating buttons over the caption of a form and I need to change their appearance according to the windows theme. So far I've managed to find Aero/Classic. Screen shots of the result, after solving the issue: You can check

Get Windows theme?

久未见 提交于 2019-11-27 07:10:06
问题 I must really know which Windows theme my user is using. More precisely, Classic, XP, Basic or Aero. (Basic theme as in Vista/7 Windows Basic theme) I already know how to find if it's aero, but how about the others? The answer can be in any .NET language (C#, VB.NET or C++). If you really have to know why on Earth I need to know the theme then here you go: I have some floating buttons over the caption of a form and I need to change their appearance according to the windows theme. So far I've