翻譯|產(chǎn)品更新|編輯:龔雪|2025-04-17 13:49:59.027|閱讀 134 次
概述:界面控件DevExpress WinForms v25.1將于今年年中更新,新版本將進(jìn)一步提升AI方面的功能等,歡迎關(guān)注我們及時(shí)獲取最新消息~
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
DevExpress WinForms擁有180+組件和UI庫(kù),能為Windows Forms平臺(tái)創(chuàng)建具有影響力的業(yè)務(wù)解決方案。DevExpress WinForms能完美構(gòu)建流暢、美觀且易于使用的應(yīng)用程序,無論是Office風(fēng)格的界面,還是分析處理大批量的業(yè)務(wù)數(shù)據(jù),它都能輕松勝任!
DevExpress下一個(gè)主要更新(v25.1)將在幾個(gè)月后發(fā)布,正如我們之前提到的那樣,新的桌面開發(fā)標(biāo)準(zhǔn)(. NET Core、AI、可訪問性)仍然是重點(diǎn)關(guān)注的領(lǐng)域。在本文中,我們?yōu)榇蠹医榻B了.DevExpress WinForms數(shù)據(jù)網(wǎng)格中即將新增的AI驅(qū)動(dòng)的語(yǔ)義搜索,歡迎下載最新版控件體驗(yàn)!
DevExpress技術(shù)交流群11:749942875 歡迎一起進(jìn)群討論
DevExpress WinForms Data Grid(v25.1)將提供增強(qiáng)的搜索體驗(yàn),并允許用戶在大型數(shù)據(jù)集中更快/更準(zhǔn)確地定位相關(guān)數(shù)據(jù)。Data Grid(數(shù)據(jù)網(wǎng)格)利用自然語(yǔ)言處理(NLP)來分析精確關(guān)鍵字匹配之外的搜索查詢,通過解釋同義詞和上下文含義,DevExpress Data Grid將提供更精確的搜索結(jié)果。
一旦啟用了人工智能驅(qū)動(dòng)的語(yǔ)義搜索,搜索框中就會(huì)出現(xiàn)一個(gè)下拉按鈕。彈出式菜單允許用戶指定搜索模式:標(biāo)準(zhǔn)、語(yǔ)義或混合(標(biāo)準(zhǔn)和語(yǔ)義搜索的組合)。
您可以在“過濾”或“搜索”模式下使用語(yǔ)義搜索,在“搜索”模式下,網(wǎng)格突出顯示相關(guān)數(shù)據(jù)行,以便更靈活/直觀地發(fā)現(xiàn)數(shù)據(jù):
語(yǔ)義搜索需要使用額外的DevExpress NuGet包:
為了在DevExpress WinForms Data Grid(數(shù)據(jù)網(wǎng)格)中啟用AI支持的語(yǔ)義搜索,您必須注冊(cè)一個(gè)嵌入生成器,提供一個(gè)矢量存儲(chǔ)/數(shù)據(jù)庫(kù),將新SemanticSearchBehavior連接到網(wǎng)格,并配置操作設(shè)置(例如,嵌入生成器、矢量存儲(chǔ)、矢量存儲(chǔ)中的記錄類型、數(shù)據(jù)源關(guān)鍵字段、搜索模式、搜索準(zhǔn)確性、最大結(jié)果數(shù)量等):
您可以使用任何實(shí)現(xiàn)了IVectorStore接口的向量存儲(chǔ)來存儲(chǔ)嵌入。有關(guān)更多信息,請(qǐng)參閱以下主題:。
下面的代碼片段初始化向量,它在內(nèi)存中創(chuàng)建一個(gè)矢量存儲(chǔ)來存儲(chǔ)矢量化記錄(用于演示目的)。生產(chǎn)型AI應(yīng)用使用向量數(shù)據(jù)庫(kù)和服務(wù)來提高相關(guān)性,async void Form1_Shown(object sender, EventArgs e)
{ try { await Initialize(); } catch(Exception ex) { MessageBox.Show(ex.ToString()); } } // Define a record stored in the vector store for semantic search class VectorStoreRecord { // A unique identifier for the record in a vector store [VectorStoreRecordKey] public string Key { get; set; } // Text content associated with the record [VectorStoreRecordData] public string ItemDescription { get; set; } // Numerical vector representation of the record // Specifies how vector data is stored and compared in a vector store // Ollama produces 768-dimensional vectors [VectorStoreRecordVector(768, DistanceFunction.CosineSimilarity)] public ReadOnlyMemory<float> Vector { get; set; } } async Task Initialize() { // Initialize an embedding generator to convert text into numerical vectors // This example uses the Ollama embedding generator. var embeddingGenerator = new OllamaEmbeddingGenerator(new Uri("http://localhost:11434/"), "nomic-embed-text"); /* The following code uses an Azure OpenAI embedding model. * You can use the 'text-embedding-3-small' model that produces 1536-dimensional vectors. * Modify the 'VectorStoreRecordVector' attribute for the 'VectorStoreRecord.Vector'. * var embeddingGenerator = new AzureOpenAIClient( * new Uri(AzureOpenAIEndPoint), * new AzureKeyCredential(AzureOpenAIKey)) * .AsEmbeddingGenerator(ModelId); */ // Create an in-memory vector store to store vectorized records var vectorStore = new InMemoryVectorStore(); // Retrieve the default AI container var container = AIExtensionsContainerDesktop.Default; // Register the embedding generator in the AI container container.AddEmbeddingGenerator(embeddingGenerator); // Register the vector store in the AI container container.AddVectorStore(vectorStore); // Create and populate the vector store with vectorized data items await container.CreateVectorStoreCollectionAsync<DataItem, VectorStoreRecord>( // Retrieve all items to be indexed dataSource: DataItem.GetAllItems(), // Specify the collection name in the vector store vectorStoreCollectionName: "DataItems", // Extract the text content from each item to be transformed into a vector vectorizableContentGetter: item => item.Name + " - " + item.Description); }
DevExpress WinForms UI控件現(xiàn)在支持基于JSON的布局序列化,這是XML的替代方案,可以簡(jiǎn)化與現(xiàn)代web和AI服務(wù)的集成。在v25.1中,一個(gè)新的SaveLayoutToJson(流)方法允許您以JSON格式保存和恢復(fù)控件布局。
JSON序列化可用于.NET 8+和.NET Framework 4.6.2+的項(xiàng)目。
string filePath = "gridlayout.json"; void Form1_Load(object sender, EventArgs e) { if (File.Exists(filePath)) { using (var jsonStream = File.OpenRead(filePath)) gridView.RestoreLayoutFromJson(jsonStream); } } void Form1_FormClosing(object sender, FormClosingEventArgs e) { using (var jsonStream = File.OpenWrite(filePath)) gridView.SaveLayoutToJson(jsonStream); }
EAP版本包括ItemsView中的新的ValidateRow和BeforeLeaveRow事件。
DevExpress基于網(wǎng)格的控件(如GridControl、TreeList、Gantt Control和VGridControl)支持用觸摸板平滑滾動(dòng)。然而,一些用戶在使用Windows設(shè)備上的觸摸板時(shí)可能會(huì)遇到水平滾動(dòng)的倒轉(zhuǎn)行為。
v25.1引入了一個(gè)新的InvertHorizontalScrolling選項(xiàng),當(dāng)使用觸摸板時(shí),它可以在DevExpress WinForms基于網(wǎng)格的控件中反轉(zhuǎn)當(dāng)前的水平滾動(dòng)方向。
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); WindowsFormsSettings.InvertHorizontalScrolling = DefaultBoolean.True; Application.Run(new Form1()); }
更多產(chǎn)品資訊及授權(quán),歡迎來電咨詢:023-68661681
慧都科技是專注軟件工程、智能制造、石油工程三大行業(yè)的數(shù)字化解決方案服務(wù)商。在軟件工程領(lǐng)域,我們提供開發(fā)控件、研發(fā)管理、代碼開發(fā)、部署運(yùn)維等軟件開發(fā)全鏈路所需的產(chǎn)品,提供正版授權(quán)采購(gòu)、技術(shù)選型、個(gè)性化維保等服務(wù),幫助客戶實(shí)現(xiàn)技術(shù)合規(guī)、降本增效與風(fēng)險(xiǎn)可控。
慧都科技是DevExpress的中國(guó)區(qū)的合作伙伴,DevExpress作為用戶界面領(lǐng)域的優(yōu)秀產(chǎn)品,幫助企業(yè)高效構(gòu)建權(quán)限管理、數(shù)據(jù)可視化(如網(wǎng)格/圖表/儀表盤)、跨平臺(tái)系統(tǒng)(WinForms/ASP.NET/.NET MAUI)及行業(yè)定制解決方案,加速開發(fā)并強(qiáng)化交互體驗(yàn)。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都網(wǎng)