Metin Dış Hat Ekle
Metin Çizgi Efektleri Ekleme
Metin kontur efektleri, her karakterin etrafına bir kenarlık çizerek metin görünürlüğünü ve stilini artırır. Bu etki, özellikle kalın ve dikkat çekici metinler oluşturmak veya metinlerin görüntüler veya renkli arka planlar üzerinde okunduğundan emin olmak için kullanışlıdır. 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. Bu ön ayar, çoğu senaryo için iyi çalışan standart bir ana hat yapılandırması sunar. Özel ana hatlar için, geliştiriciler belirli görsel efektler elde etmek amacıyla ana hat genişliği, rengi ve çizgi stili gibi özellikleri belirleyebilirler.
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. Bu yapılandırılmış yaklaşım, doğru biçimlendirmeyi sağlar ve belgenin bütünlüğünü korur.
Kod Açıklaması
IronWord ile metne bir metin çerçevesi uygulamak son derece basittir. Sadeliklerine rağmen, metin taslağının her bir özelliği her ihtiyaca uygun olacak şekilde ayarlanabilir. 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. Bu, belge sıralamasını takip eder: Document → Paragraph → Run → TextContent. Son olarak, belge dışa aktarılır.
IronWord ile Belge Öğeleri hakkında daha fazla bilgi edinin.

