FillType

FillType enumeration

Anger fyllningstyp för ett ifyllbart objekt.

public enum FillType

Värderingar

namnVärdeBeskrivning
Solid1Helfyllning.
Patterned2Mönstrad fyllning.
Gradient3Gradientfyllning.
Textured4Texturerad fyllning.
Background5Fyllningen är densamma som bakgrunden.
Picture6Bildfyllning.

Exempel

Visar hur man konverterar tillbaka fyllningarna till heldragen fyllning.

Document doc = new Document(MyDir + "Two color gradient.docx");

// Hämta Fill-objekt för teckensnittet för den första körningen.
Fill fill = doc.FirstSection.Body.Paragraphs[0].Runs[0].Font.Fill;

// Kontrollera fyllningsegenskaperna för teckensnittet.
Console.WriteLine("The type of the fill is: {0}", fill.FillType);
Console.WriteLine("The foreground color of the fill is: {0}", fill.ForeColor);
Console.WriteLine("The fill is transparent at {0}%", fill.Transparency * 100);

// Ändra fyllningstyp till Helfärgad med enhetlig grön färg.
fill.Solid();
Console.WriteLine("\nThe fill is changed:");
Console.WriteLine("The type of the fill is: {0}", fill.FillType);
Console.WriteLine("The foreground color of the fill is: {0}", fill.ForeColor);
Console.WriteLine("The fill transparency is {0}%", fill.Transparency * 100);

doc.Save(ArtifactsDir + "Drawing.FillSolid.docx");

Se även