Degrade Efekti Ekle

Metne Geçiş Efektleri Uygulama

IronWord'deki geçiş efekti, metnin renk geçişleri sergilemesine ve görsel olarak çekici tasarımlar oluşturmasına olanak tanır. IronWord provides preset gradient options through the Gradient class, such as Gradient.DefaultGray, which can be assigned directly to the GradientEffect property of a TextEffect.

To apply a gradient, create a TextStyle object and configure its TextEffect property with a GradientEffect. The gradient can be set using predefined static instances from the Gradient class, which offer commonly used color schemes and transitions. Bu önceden ayarlamalar, manuel olarak renk duraklarını yapılandırmak zorunda kalmadan profesyonel görünümlü geçişler ekleme sürecini kolaylaştırır.

Once the style is configured, create a Run containing TextContent and assign the style to the run's Style property. Add the run to a paragraph using AddChild, then insert the paragraph into the document. Bu yapılandırılmış yaklaşım, geçiş efektinin düzgün bir şekilde uygulandığından ve çıktı belgesinde korunduğundan emin olur.

Kod Açıklaması

Yukarıdaki kod, metne bir geçiş efekti uygulamanın yolunu gösterir. Öncelikle yeni bir Word belgesi oluşturulur. Then, it creates a TextStyle object and configures it to use a gradient effect by assigning the Gradient.DefaultGray preset to the GradientEffect property.

To add the styled text, 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 gradient 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, yeni Word belgesi dışa aktarılır.

Daha fazla örnek ve gösterim için lütfen şu makaleye gidin: Metne Geçiş Efekti Ekleme.

Burada Daha Fazla Word Belge Öğesi Eğitimlerini Keşfedin

Başlamaya Hazır mısınız?
Nuget İndirmeler 44,829 | Sürüm: 2026.5 just released
Still Scrolling Icon

Hâlâ Kaydırıyor Musunuz?

Hızlıca kanıt ister misiniz? PM > Install-Package IronWord
bir örnek çalıştırın verilerinizi bir Word belgesine dönüştürün.