新增文字輪廓 新增文字輪廓效果 文字輪廓效果透過在每個字元周圍繪製邊框,來提升文字的辨識度與風格。 此效果特別適用於製作粗體、引人注目的文字,或確保文字出現在圖片或彩色背景上時仍具可讀性。 IronWord provides the TextOutlineEffect class with preset configurations for quick implementation. To apply a text outline, create a TextStyle object and configure its TextEffect property with TextOutlineEffect.DefaultEffect. 此預設設定提供了一套標準的綱要配置,適用於大多數情境。 針對自訂輪廓,開發人員可指定輪廓寬度、顏色及線條樣式等屬性,以實現特定的視覺效果。 After setting up the text style, create a Run containing the desired TextContent and assign the configured style to the run's Style property. Use AddChild to add the styled run to a paragraph, then add the paragraph to the document. 此結構化方法可確保格式正確,並維持文件的完整性。 程式碼解釋 使用 IronWord 為文字添加輪廓非常簡單。 儘管文字輪廓很簡單,但每個屬性都可以進行調整以滿足各種需求。 Once a Word document is imported, the textStyle is configured to include a text outline effect by assigning TextOutlineEffect.DefaultEffect to the TextOutlineEffect property of a new TextEffect instance. To apply this effect to text, a Paragraph is created, then a Run object is created containing the desired TextContent. The configured textStyle is assigned to the Run, applying the text outline effect. The Run is added to the Paragraph using AddChild, and the Paragraph is added to the document. 此文件遵循以下層級結構:文件 → 段落 → 執行 → 文字內容。 最後,文檔被導出。 使用 IronWord 了解更多關於文件元素的資訊。 相關文檔連結 在 GitHub 上查看 相關教程 相關操作指南 類文檔 下載 IronWord DLL 回報此頁面的問題 準備好開始了嗎? Nuget 下載 36,374 | 版本: 2026.3 剛剛發布 開始免費試用 免費 NuGet 下載 總下載量:36,374 查看許可證 還在捲動嗎? 想要快速證明? PM > Install-Package IronWord 執行範例 觀看您的資料變成 Word doc。 免費 NuGet 下載 總下載量:36,374 查看許可證