影エフェクトを追加 テキストに影の効果を実装する 影効果は、文字の後ろに影のオフセットを作成して、テキストに深みと立体感を加えます。 IronWord provides predefined shadow presets through the Shadow class, offering various shadow styles that can be applied quickly without manual configuration. To add a shadow effect, create a TextStyle and configure its TextEffect property with a shadow preset such as Shadow.OuterShadow1. These static named instances from the Shadow class provide professionally designed shadow configurations with appropriate blur, distance, and angle settings. 外側の影のバリエーションは、テキストから影を遠ざけ、浮き上がったような外観を作り出します。 Once the text style is configured with the desired shadow effect, create a Run object containing TextContent and assign the style to the run. Add the styled run to a paragraph using AddChild, then include the paragraph in the document. このアプローチは IronWord のドキュメント階層に従い、出力ファイルに影の効果が正しく適用されるようにします。 コードの説明 Wordドキュメント内のテキストに影効果を追加するには、ほんの数行のコードで済みます。 For completeness, let's first initialize a new WordDocument instance called doc. Then, a TextStyle object is created and configured to incorporate a shadow effect by assigning the Shadow.OuterShadow1 static named instance to the TextEffect property. To add the styled text with the shadow effect, a Paragraph is created, then a Run object is created containing TextContent with "Hello World". The configured textStyle is assigned to the Run, applying the shadow effect. The Run is added to the Paragraph using AddChild, and the Paragraph is added to the document. これは、ドキュメント階層に従います: ドキュメント → 段落 → 実行 → TextContent。 最後に、Wordドキュメントをエクスポートします。 さらなる例やデモンストレーションについては、次の記事をご覧ください: テキストに影効果を追加する方法 IronWord チュートリアルでドキュメント要素を調べます。 関連ドキュメントリンク GitHubで見る 関連チュートリアル 関連ハウツーガイド クラスドキュメンテーション IronWord DLLをダウンロード このページの問題を報告する 準備はできましたか? Nuget ダウンロード 35,581 | バージョン: 2026.3 リリース 無料トライアル NuGet 無料版 総ダウンロード数: 35,581 ライセンスを見る まだスクロールしていますか? すぐに証拠が欲しいですか? PM > Install-Package IronWord サンプルを実行する あなたのデータが Word ドキュメントになるのを見る。 NuGet 無料版 総ダウンロード数: 35,581 ライセンスを見る