百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

MetroRadiance

> 编程语言
开源

现代 WPF 主题 (如 Visual Studio 2012 或更高版本)。

341 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

现代 WPF 主题 (如 Visual Studio 2012 或更高版本)。

MetroRadiance

UI control libraries for create WPF window like Visual Studio 2012/2013/2015.

Installation

Install NuGet package(s).

powershell
PM> Install-Package MetroRadiance
  • MetroRadiance.Core - MetroRadiance core library.
  • MetroRadiance.Chrome - Chrome library for WPF Window.
  • MetroRadiance - WPF custom control library.

Features / How to use

MetroRadiance.Core

  • DPI / Per-Monitor DPI support
    • Get system DPI
    • Get monitor DPI from HwndSource or window handle
csharp
using MetroRadiance.Interop;
csharp
// Get system dpi
var systemDpi = window.GetSystemDpi();

if (PerMonitorDpi.IsSupported)
{
    // Get monitor dpi.
    var hwndSource = (HwndSource)PresentationSource.FromVisual(this);
    var monitorDpi = hwndSource.GetDpi();
}
  • Windows theme support
    • Get Windows theme (Light or Dark, only Windows 10)
    • Get Windows accent color
    • Subscribe color change event from Windows
csharp
using MetroRadiance.Platform;
csharp
// Get Windows accent color
var color = WindowsTheme.GetAccentColor();

// Subscribe accent color change event from Windows theme.
var disposable = WindowsTheme.RegisterAccentColorListener(color =>
{
    // apply color to your app.
});

// Unsubscribe color change event.
disposable.Dispose();
  • HSV color model support
csharp
using MetroRadiance.Media;
csharp
// Get Windows accent color (using MetroRadiance.Platform;)
var rgbColor = WindowsTheme.GetAccentColor();

// Convert from RGB to HSV color.
var hsvColor = rgbColor.ToHsv();
hsvColor.V *= 0.8;

// Convert from HSV to RGB color.
var newColor = hsvColor.ToRgb();

MetroRadiance.Chrome

  • Add window chrome like Visual Studio to WPF Window
    • MetroRadiance.Chrome.WindowChrome
xaml

    
        
    
  • Add any UI elements to window chrome
    • MetroRadiance.Chrome.WindowChrome.Top / .Left / .Right / .Bottom
xaml

    
        
            
                
                    
                
            
        
    

MetroRadiance

  • Theme support
csharp
// Change theme.
ThemeService.Current.ChangeTheme(Theme.Dark);

// Change theme (sync Windows)
ThemeService.Current.ChangeTheme(Theme.Windows);

// Change Accent
ThemeService.Current.ChangeAccent(Accent.Blue);

// Change accent (sync Windows)
ThemeService.Current.ChangeAccent(Accent.Windows);

// Change accent (from RGB Color)
var accent = Colors.Red.ToAccent();
ThemeService.Current.ChangeAccent(accent);
  • Custom controls
  • Custom behaviors
  • Custom converters

License

This library is under the MIT License (MIT).

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言