Where can I know key of Windows 8 metro background brush? - c#

It is kinda baby question but it is important for the visual appearance of my app.
When I installed Windows 8 DevPreview on my PC os proposed me to choose the color scheme for Metro UI. I preferred teal color. It is something like next:
So I have this color scheme for background and for setting background. Now I want to implement the custom setting for my app. Something like next:
But for good user experience, I want to keep my settings in the same color that system. In the current moment, I set settings background manual. But it isn't a solution because a user can prefer another color scheme. I've checked in StandardStyles and in main generic XAML file. But looks like that I missed it. I would be pleasure if anybody help with this.

This value is not available in the current SDK. Though the initial settings flyout pane does match the system color, you'll notice that any custom settings panes are usually white or a color that matches the application.
Take a look at the Bing Weather app and you'll see what I mean. All of the applications custom settings have a blue background (even though I personally have a teal theme).
Also, don't get confused by the "Permissions" settings. That dialog is also provided by the OS.

Related

Change Windows 10 wallpaper programmatically (Restricted using 'Active Desktop Wallpaper in Group Policy')

To be sincere, in my company system changing the wallpaper has been restricted. They have put up a black screen as wallpaper, so whenever I open up the system it feels like am in a dead place.
I think they are using 'Active Desktop Wallpaper in Group Policy' for restricting the wallpaper change. First of all, am just curious to know whether it is possible and is there a way to override this programmatically? I don't need full code, some pointers would be really helpful.
There is no way to change the wallpaper if it was restricted in the windows group policy, this applies to all windows version, including Windows 10, any attempts of trying to change it via winapi functions will result in failure, and changing the GP using a non-administrator account is not possible.
Also, sins you said that this is in the company for which you work I suggest staying away from any attempts of changing it as you may get into trouble.
Just something that I wouldn't recommend but is kind of possible
There is a way tho to not really change the wallpaper but instead create a type of overlay which will put a image in front of the wallpaper while still having files and folders be top most, a good example of this is Wallpaper Engine, but I wouldn't recommend doing this either, because, just like attempting to change the actual wallpaper, it may result in you getting into trouble.
If you are restricted to change the wallpaper by a windows policy, nothing can allow you to do it.
Any WinAPI will refuse to do that.
As I know.

Apply windows theme to winforms application

I currently have an application for personal use, which I also take to work. I use a custom windows 8 theme on my computer at home and my application is designed around this theme. So when I open my application at work, or anywhere else for that matter, it obviously looks nothing like expected and certain text is unreadable because the colors simply do not match.
My question is, if there's a library or feature which I've missed, with which I can apply this windows theme to my application without installing the theme on the system?
If not, is this possible with WPF, without too much trouble?
Thanks!

Programmatically change display color/tint in Windows Phone

Is there any way to change the display tint or color using the Windows Phone API? I'm looking for something similar to how F.lux changes the blue amount.
No you cannot. System settings cannot be changed by applications, they can only be changed by users.
If you want to enable it for your application only, that is possible. But globally, unlikely.

Inheriting default ComboBox to change border color or disable it

I'm working in a WinForms project.
I have a dark theme activated in Windows and this is a default combobox when it's focused:
And this is when it has no focus:
An horrible and insane white border appears when the control lost focus, I want to avoid that without disabling XP Styles in the project.
I know that maybe the only way is inheriting the control to make my own, the problem is I don't know what I need to do with the control, maybe changing a setstyle property or I don't know.
I think you're trying to solve a problem that isn't in the scope of your application. Isn't this just an issue with the theme in question you are using?
Windows has many themes. The major themes still supported are Classic (pre-XP), Luna (XP), Aero (Vista/Win7), and Modern (Windows 8). All of these can be customized to create an infinite number of possible scenarios.
Most Windows Forms controls are based on Win32 controls which are drawn by the OS according to these system themes.
So you have to understand that on the machine you're testing on what you're seeing is going to vary a lot from what users of the application will see on different versions of Windows with different user preferences.
The simple fact is that if you use WinForms base controls you really should surrender control of the appearance to the OS as much as possible.
It's also widely accepted to create your own application theme that the user can't change or that they have to pick from a predetermined set of themes you have created. Examples of this include Google Chrome, iTunes, Winamp, etc. It is typically an awful lot of work to do this with simple Win32 controls unless you use something like WPF which makes it easier.
The important thing is that you can't really pick and choose which parts of your application to theme. If you want it to look consistent you either take responsibility for the entire theme yourself or follow the Windows standards of using system resource colors such as ControlText, ActiveBorder, AppWorkspace, etc.

How can i find the order of the taskbar items in Windows 7?

I would like to establish what is the order of the taskbar items in Windows 7. The reason is that I would like to create an script (written in AutoHotkey or C#) that restore a set of icons to a previous determined order. I wan't to do this because any Virtual Desktop solutions for Windows forget the great and important point of keeping the taskbar item's order, i.e between desktop changes the order of the taskbar items are completely ignored and lost. The reason of why they ignore that fact is maybe because all of them rely in the HIDE/UNHIDE approach, they save what windows are active in any desktop and then between switches they Hide or UnHide the corresponding windows.
I already found a semi solution writted in QT/C++ (Location of app on the Windows 7 Taskbar) that base his function in find the left-upper pixel position of an item based in his color. I don't like that approach because the use of different themes or visual styles would break his functioning. I hope someone has another suggestion. This question differs from that in the link that I'm only interested in the order not in the exact pixel position of any button.
You may want to start with the Windows® API Code Pack for Microsoft® .NET Framework. This API allows you access to several Windows APIs (including certain taskbar functions) from managed code.
However, I'm not certain yet that it allows for functionality regarding the task bar in general vs. a specific application's taskbar entry. I will continue researching this and update if/when I find more information.

Categories