Yes, WPF.
How to retrieve accent color that the user has chosen in Windows settings into a desktop WPF application?
for example for a Button?
C# is a programming language. WPF is a technology used to develop rich GUI applications using C# (or any other . NET language).
“WPF would be dead in 2022 because Microsoft doesn't need to be promoting non-mobile and non-cloud technology. But WPF might be alive in that sense if it's the best solution for fulfilling specific customer needs today. Therefore, having a hefty desktop application needs to run on Windows 7 PCs with IE 8.
WPF is used to build Windows client applications that run on Windows operating system. WPF uses XAML as its frontend language and C# as its backend languages. WPF was introduced as a part of . NET Framework 3.0 as the Windows library to build Windows client apps and the next generation of Windows Forms.
Windows Presentation Foundation is a UI framework that creates desktop client applications. The WPF development platform supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding, documents, and security.
I'm not sure which version of .Net you're using, but if you're using 4.5 or higher, you can use the SystemParameters class. I think the property you more than likely are after is the WindowsGlassBrush.
this.Background = SystemParameters.WindowGlassBrush;
Note though, that the properties in this class are marked with SecurityCriticalAttribute, so you will more than likely need full trust to access them.
I wanted the XAML version of Richard Preziosi answer, that would be :
BorderBrush="{Binding Source={x:Static SystemParameters.WindowGlassBrush}}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With