Ajouter un effet de réflexion Création de texte avec effet de réflexion L'effet de réflexion ajoute une image miroir sous le texte, créant ainsi un aspect soigné et moderne. In IronWord, this effect is applied through the ReflectionEffect property of a TextEffect object, which can be customized or used with default settings. To implement a reflection effect, create a TextStyle and configure its TextEffect property with a Reflection instance. The Reflection class supports default initialization, which applies standard reflection parameters suitable for most use cases. Pour les reflets personnalisés, des propriétés telles que la distance, le flou et la transparence peuvent être ajustées pour affiner l'apparence. After defining the text style, create a Run containing your TextContent and assign the configured style to the run. Use AddChild to add the run to a paragraph, maintaining the proper document hierarchy of Document → Paragraph → Run → TextContent. Enfin, ajoutez le paragraphe au document pour appliquer l'effet de réflexion. Explication du code Créons un nouveau document Word et ajoutons-y du texte avec un effet de réflexion. Initially, a new WordDocument object named doc is created. A TextStyle object is then instantiated and configured to include a reflection effect by setting its TextEffect property to a new Reflection object. To add the styled text with the reflection effect, a Paragraph is created, then a Run object is created containing TextContent with "Hello World". The TextStyle is assigned to the Run, applying the reflection effect. The Run is added to the Paragraph using AddChild, and the Paragraph is added to the document. Cela suit la hiérarchie du document : Document → Paragraphe → Run → TextContent. Enfin, le document est enregistré. Explorez les éléments de document dans les tutoriels IronWord. Liens de documentation associés Voir sur GitHub Tutoriel connexe Guide pratique connexe Documentation de classe Télécharger IronWord DLL Signaler un problème sur cette page Prêt à commencer? Nuget Téléchargements 35,581 | Version : 2026.3 vient de sortir Essai gratuit Téléchargement gratuit NuGet Total des téléchargements :35,581 Voir Licences Vous faites encore défiler ? Vous voulez une preuve rapidement ? PM > Install-Package IronWord exécuter un échantillon regarder vos données devenir un document Word. Téléchargement gratuit NuGet Total des téléchargements :35,581 Voir Licences
Testez dans un environnement en direct Testez en production sans filigranes.Fonctionne où que vous en ayez besoin.
Produit entièrement fonctionnel Profitez de 30 jours de produit entièrement fonctionnel.Configurez-le et faites-le fonctionner en quelques minutes.
Nous répondons à toutes vos questions afin de nous assurer que vous disposez de toutes les informations dont vous avez besoin. (Sans aucun engagement)