翻譯|行業資訊|編輯:龔雪|2025-05-08 10:12:28.793|閱讀 339 次
概述:界面控件DevExpress WinForms v25.1將于今年年中更新,新版本將進一步升級功能區組件等,歡迎關注我們及時獲取最新消息~
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
DevExpress WinForms擁有180+組件和UI庫,能為Windows Forms平臺創建具有影響力的業務解決方案。DevExpress WinForms能完美構建流暢、美觀且易于使用的應用程序,無論是Office風格的界面,還是分析處理大批量的業務數據,它都能輕松勝任!
DevExpress下一個主要更新(v25.1)將在幾個月后發布,正如我們之前提到的那樣,新的桌面開發標準(. NET Core、AI、可訪問性)仍然是重點關注的領域。在本文中,我們為大家介紹了.DevExpress WinForms在功能區組件方面的升級,歡迎下載最新版控件體驗!
DevExpress技術交流群11:749942875 歡迎一起進群討論
新的API包括:
新的API包括:
barManager1.ItemClick += (sender, e) => {
BarItem item = barManager1.GetItemAt(Cursor.Position);
// BarItemLink itemLink = barManager1.GetLinkAt(Cursor.Position);
Debug.WriteLine(item.Caption);
};
DevExpress WinForms Bar Manager(欄管理器)和Ribbon控件將支持對欄項進行右鍵操作,新事件包括:
v25.1還將引入了一個新的e.MouseButtton事件參數,它允許您識別按下的鼠標按鈕。
在v25.1中,官方增強了傳統的基于工具欄的用戶界面鍵盤可訪問性。用戶可以使用相同的助記符循環遍歷子菜單項(在標題中用&表示),當子菜單中的多個項目具有相同的助記符時,重復的按鍵按順序瀏覽它們。該特性是自動啟用的,不需要額外的配置。
 
barItemSaveAs.Caption = "Save &As"; barItemSaveAll.Caption = "Save &All";
AutomationId屬性 - 在自動化測試和可訪問性(a11y) 工具中區分UI元素的唯一標識符——現在可用于BarItem對象,此屬性自動設置為欄項的名稱。
在v25.1中,您可以指定切換開關欄的寬度,使用EditorToThumbWidthRatio屬性設置項目的總寬度相對于拇指的寬度。
 
 
官方將DevExpress WinForms Accordion控件與裝飾器UI管理器集成在一起,來幫助顯示徽章/提示并突出顯示特定的Accordion UI元素。
 
using System.Drawing;
using DevExpress.Utils.VisualEffects;
// ...
Badge badgeInbox;
public Form1() {
InitializeComponent();
badgeInbox = new Badge();
// Assign the badge to the 'Inbox' accordion item
badgeInbox.TargetElement = accordionItemInbox;
// Specify badge text
badgeInbox.Properties.Text = "17";
// Specify badge location and offset
badgeInbox.Properties.Location = ContentAlignment.TopLeft;
badgeInbox.Properties.Offset = new Point(85, 6);
// Customize badge appearance
badgeInbox.Appearance.BackColor = Color.Gray;
badgeInbox.Appearance.BorderColor = Color.Gray;
badgeInbox.Appearance.ForeColor = Color.White;
badgeInbox.Appearance.Font = new Font("Tahoma", 8.25F, FontStyle.Bold);
// Add the badge to the AdornerUIManager
adornerUIManager1.Elements.Add(badgeInbox);
}
Accordion(折疊)現在支持鍵盤快捷鍵,使用ShortcutKey屬性指定預定義或自定義鍵盤快捷方式。這種增強提高了可訪問性,特別是對于具有復雜導航結構的應用程序。
V25.1引入了新的功能,旨在:
void messageButton_Click(object sender, EventArgs e) {
XtraMessageBoxArgs args = new XtraMessageBoxArgs() {
Caption = "Tip",
Text = "Hello DevExpress!",
Buttons = new DialogResult[] { DialogResult.OK },
};
args.ImageOptions.SvgImage = svgImageCollection1["info"];
args.ImageOptions.SvgImageSize = new Size(32, 32);
args.Showing += Args_Showing;
XtraMessageBox.Show(args);
}
void Args_Showing(object sender, XtraMessageShowingArgs e) {
// Get the screen working area
Rectangle workingArea = Screen.PrimaryScreen.WorkingArea;
// Calculate bottom-right position
int x = workingArea.Right - e.MessageBoxForm.Width;
int y = workingArea.Bottom - e.MessageBoxForm.Height;
// Define message box start position
e.MessageBoxForm.StartPosition = FormStartPosition.Manual;
e.MessageBoxForm.Location = new Point(x, y);
// Display the message box in the Windows taskbar
e.MessageBoxForm.ShowInTaskbar = true;
}
慧都是?家?業數字化解決?案公司,專注于軟件、?油與?業領域,以深?的業務理解和?業經驗,幫助企業實現智能化轉型與持續競爭優勢。
慧都科技是DevExpress的中國區的合作伙伴,DevExpress作為用戶界面領域的優秀產品,幫助企業高效構建權限管理、數據可視化(如網格/圖表/儀表盤)、跨平臺系統(WinForms/ASP.NET/.NET MAUI)及行業定制解決方案,加速開發并強化交互體驗。
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@ke049m.cn
文章轉載自:慧都網