mirror of
https://gitee.com/AntdUI/AntdUI.git
synced 2025-12-06 16:09:14 +08:00
2.8 KiB
2.8 KiB
Color Mode
Default Light color mode
Set color mode
AntdUI.Config.Mode = AntdUI.TMode.Light;
Is it in light color mode
bool islight = AntdUI.Config.IsLight;
AntdUI.Config.IsLight = true;// Set to light color mode
Is it in dark mode
bool isdark = AntdUI.Config.IsDark;
AntdUI.Config.IsDark = true;// Set to dark mode
Configure global switching themes 🔴
After configuration, forms that inherit BaseForm will automatically switch themes
AntdUI.Config.Theme()
.Light("#fff", "#000") // Light mode background white (#fff) | foreground black (#000)
.Dark("#000", "#fff") // Dark mode background black (#000) | foreground white (#fff)
.Header("#f3f3f3", "#111111"); // PageHeader header head background light color light gray (#f3f3f3) | dark background color dark gray (#111111)
Animation Off
Default animation on
AntdUI.Config.Animation = false;
Touch Screen Enabled
Default Enable touch
AntdUI.Config.TouchEnabled = true;
Shadow Enabled
Default shadow on
AntdUI.Config.ShadowEnabled = false;
ScrollBar Hidden Style
Default continuous display
false
AntdUI.Config.ScrollBarHide = false;
MinimumSize of ScrollBar Y 🔴
Default
30
AntdUI.Config.ScrollMinSizeY = 30;
Popup in the window Message/Notification
Default screen popup
AntdUI.Config.ShowInWindow = true;
Separate Config
Popup in the window (Message)
AntdUI.Config.ShowInWindowByMessage = true;
Popup in the window (Notification)
AntdUI.Config.ShowInWindowByNotification = true;
Message/Notification Boundary Offset XY
Default 0
AntdUI.Config.NoticeWindowOffsetXY = 0;
Close Message/Notification immediately after exceeding the display limit 🔴
Default, wait for old ones to close before displaying
AntdUI.Config.NoticeOverflowClose = false;
Text Rendering Quality
AntdUI.Config.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
Text Rendering HighQuality 🔴
AntdUI.Config.TextRenderingHighQuality = true;
Default Font
AntdUI.Config.Font = new Font("Microsoft YaHei UI", 10);
Get DPI
1=100%、1.25=125%,and so on
float dpi = AntdUI.Config.Dpi;
Custom DPI
AntdUI.Config.SetDpi(1.5F);
Set Correction Text Rendering
AntdUI.Config.SetCorrectionTextRendering("Microsoft YaHei UI", "Microsoft YaHei"); //List of fonts that need to be corrected
