FillType

FillType enumeration

Especifica el tipo de relleno para un objeto rellenable.

public enum FillType

Valores

NombreValorDescripción
Solid1Relleno sólido.
Patterned2Relleno estampado.
Gradient3Relleno degradado.
Textured4Relleno texturizado.
Background5El relleno es el mismo que el fondo.
Picture6Relleno de imagen.

Ejemplos

Muestra cómo convertir cualquiera de los rellenos nuevamente a relleno sólido.

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

// Obtener el objeto de relleno para la fuente de la primera ejecución.
Fill fill = doc.FirstSection.Body.Paragraphs[0].Runs[0].Font.Fill;

// Verificar las propiedades de relleno de la fuente.
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);

// Cambia el tipo de relleno a Sólido con color verde uniforme.
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");

Ver también