I like the Windows 7 visual style very much:
A button looks like this on Windows 10:
Is there a way to force the Windows 7 style with WinForms on a higher platform?
Thank you!
Related
I develop a WPF desktop application that runs in a Citrix environment which applies the Windows 7 Basic Theme to my application. As a result, I run Windows 7 on my dev workstation to make sure the UI renders as intended.
I would like to upgrade it to Windows 10, however, but I have to find means of running my app with the Windows 7 theme within Windows 10. Incidentally (and oddly), if I run my app in Windows XP compatibility mode on Windows 10, it renders with the Windows 7 theme, so surely the OS is able to render the theme. I'm not sure I want to do all the testing of my app with compatibility mode activated, though...
I am also aware of 3rd party theming solutions, but to rule out any discrepancies, I would like to use the authentic Windows 7 theme from Microsoft.
Are there any tricks/tweaks/hacks out there to simply enable the Windows 7 theme for my app in Windows 10?
The WPF Theme for Aero is located in the PresentationFramework.Aero library, so add that as a reference. Then, in your App.xaml add the following merged dictionary to override the default theme.
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml" />
</ResourceDictionary.MergedDictionaries>
I'm pleasantly surprised that they've finally updated WPF in .NET 4.5 to support Windows 8/10 themeing (they didn't at the start of Windows 8) with the following:
PresentationFramework.Aero2
PresentationFramework.AeroLite
Haven't seen it before today, need to work with .NET 4.5 more often ;)
Try making the form an MDI with child windows as MDI Childs use the Windows 7 style as their border, or add some references to PresentationFramework.Aero/AeroLite/Aero2 and apply it in your code
I just deployed my WPF application to Windows 8 and was shocked to see that none of my labels line up with their respective textboxes! In both Visual Studio 2010 and 2012 they snap-to and line up perfectly in the design view. They also line up perfectly when the application runs in Windows 7 and XP. I'm using the same resolution/DPI settings for both deployments. Has anyone else noticed this issue? Does anyone have any ideas as to why this is happening?
Are you manipulating the size of the TextBoxes or labels in your application?
[EDITED]
After several tries, I found out it was the Microsoft WPF Ribbon that causes the title bar style not rendering correctly.
Application without Ribbon in XP:
Application with Ribbon in XP:
I have already set the theme to be XP style. Still not fix. It is a bug in Microsoft Ribbon or am I missing something? On Window 7, on the other hand, renders OK.
Develop on WPF C# .NET 4, VS2010.
Why do you care? this is a user setting to have Aero enabled or not in Vista or 7 and theming enabled or not in XP like in 2 and 3 pictures you sent.
In general you should ignore this. Office 2007 and 2010 with ribbon UI renders the same but because ribbons are skinning the application windows completely.
My suggestion is to either use skins and do the same or simply ignote this because if I use Vista with Aero enabled I would not like your App to look like classic Win2000 applications.
This is anyways an issue with the window title bar as it will use the default theme of the OS you are using.
I suggest you to neutralize the style by implementing a custom window style that takes the windows 7 look n feel for all windows ion your applications. Have a look at the MessageBox control from latest extended WPF toolkit.
It has a windows 7 style themse that looks exactly same on all the above OS if you use
Window.AllowsTransparency="False"
Window.WindowStyle="None"
Window.Style="{StaticResource Windows7WindowStyle}"
I'm a C# developer taking my first steps in Windows Mobile development. I've installed Visual Studio 2008 SP1 and the Windows mobile 6 Pro and Standard SDK's. Now I am trying to create a simple winforms application.
The problem is that when I set the Target Platform to Windows Mobile Standard, I seem to be missing a lot of controls. For example, there is a checkbox, but there isn't even a simple button (take a look at this screenshot ). When I switch to Windows Mobile 6 Professional, I get all kinds of controls.
What could be the problem? I've already tried to repair the WM 6 standard SDK, but that did not help.
Thanks,
Adrian
That's correct. Windows Mobile Standard, also known as Smartphone, doesn't have a touchscreen. All interaction is done through the two menu action buttons. Because of this many controls, like buttons, don't make sense and are therefore filtered from the toolbox.
We have a system built using WPF and have (until recently) been developing using Visual Studio 2008 SP1 and Windows XP SP3.
We have upgraded some of our development boxes to windows 7 and we have discovered we are getting some unexpected behaviour when running our applications. Some controls do not display at all.
Has anybody else experienced issues like these and if so, how can we make them work?
Thanks in advance.
Just a guess I had some similar issues with controls (buttons in my case) that were using the DropShadowEffect. The solution was to switch from DropShadowEffect to DropShadowChrome.