Word.ShadingTextureType enum

Stellt das Schattierungsmuster dar. Weitere Informationen zum Anwenden von Hintergründen wie Texturen finden Sie unter Hinzufügen, Ändern oder Löschen der Hintergrundfarbe in Word.

Hinweise

API-Satz: WordApiDesktop 1.1

Verwendet von

Beispiele

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-styles.yaml

// Updates shading properties (e.g., texture, pattern colors) of the specified style.
await Word.run(async (context) => {
  const styleName = (document.getElementById("style-name") as HTMLInputElement).value;
  if (styleName == "") {
    console.warn("Enter a style name to update shading properties.");
    return;
  }

  const style: Word.Style = context.document.getStyles().getByNameOrNullObject(styleName);
  style.load();
  await context.sync();

  if (style.isNullObject) {
    console.warn(`There's no existing style with the name '${styleName}'.`);
  } else {
    const shading: Word.Shading = style.shading;
    shading.load();
    await context.sync();

    shading.backgroundPatternColor = "blue";
    shading.foregroundPatternColor = "yellow";
    shading.texture = Word.ShadingTextureType.darkTrellis;

    console.log("Updated shading.");
  }
});

Felder

darkDiagonalDown = "DarkDiagonalDown"

Stellt eine dunkle diagonal nach unten verlaufende Textur dar.

darkDiagonalUp = "DarkDiagonalUp"

Stellt eine dunkle, diagonal nach oben gerichtete Textur dar.

darkGrid = "DarkGrid"

Stellt eine dunkle horizontale Kreuzstruktur dar.

darkHorizontal = "DarkHorizontal"

Stellt eine dunkle horizontale Textur dar.

darkTrellis = "DarkTrellis"

Stellt eine dunkle diagonale Kreuzstruktur dar.

darkVertical = "DarkVertical"

Stellt dunkle vertikale Textur dar.

lightDiagonalDown = "LightDiagonalDown"

Stellt eine leichte diagonal nach unten verlaufende Textur dar.

lightDiagonalUp = "LightDiagonalUp"

Stellt eine leichte diagonal nach oben gerichtete Textur dar.

lightGrid = "LightGrid"

Stellt eine helle horizontale Kreuztextur dar.

lightHorizontal = "LightHorizontal"

Stellt eine helle horizontale Textur dar.

lightTrellis = "LightTrellis"

Stellt eine helle diagonale Kreuztextur dar.

lightVertical = "LightVertical"

Stellt eine helle vertikale Textur dar.

none = "None"

Gibt an, dass keine Textur vorhanden ist.

percent10 = "Percent10"

Stellt 10 Prozent Textur dar.

percent12Pt5 = "Percent12Pt5"

Stellt 12,5 Prozent Textur dar.

percent15 = "Percent15"

Stellt 15 Prozent Textur dar.

percent20 = "Percent20"

Stellt 20 Prozent Textur dar.

percent25 = "Percent25"

Stellt 25 Prozent Textur dar.

percent30 = "Percent30"

Stellt 30 Prozent Textur dar.

percent35 = "Percent35"

Stellt 35 Prozent Textur dar.

percent37Pt5 = "Percent37Pt5"

Stellt 37,5 Prozent Textur dar.

percent40 = "Percent40"

Stellt 40 Prozent Textur dar.

percent45 = "Percent45"

Stellt 45 Prozent Textur dar.

percent5 = "Percent5"

Stellt 5 Prozent Textur dar.

percent50 = "Percent50"

Stellt 50 Prozent Textur dar.

percent55 = "Percent55"

Stellt 55 Prozent Textur dar.

percent60 = "Percent60"

Stellt 60 Prozent Textur dar.

percent62Pt5 = "Percent62Pt5"

Stellt 62,5 Prozent Textur dar.

percent65 = "Percent65"

Stellt 65 Prozent Textur dar.

percent70 = "Percent70"

Stellt 70 Prozent Textur dar.

percent75 = "Percent75"

Stellt 75 Prozent Textur dar.

percent80 = "Percent80"

Stellt 80 Prozent Textur dar.

percent85 = "Percent85"

Stellt 85 Prozent Textur dar.

percent87Pt5 = "Percent87Pt5"

Stellt 87,5 Prozent Textur dar.

percent90 = "Percent90"

Stellt 90 Prozent Textur dar.

percent95 = "Percent95"

Stellt 95 Prozent Textur dar.

solid = "Solid"

Stellt eine solide Textur dar.