Interface ITextStyle
Assembly: IronPPT.dll
Syntax
public interface ITextStyle : IDocumentStyle
Character-level formatting, the bold, italic, color, font, and underline of a run, lives behind ITextStyle. It is the contract a developer sets to control how a stretch of text looks, the place to reach when text on a slide needs the right weight, color, or typeface.
A developer rarely constructs this contract: it arrives as the TextStyle property of a run or a named IStyle, and TextStyle is the concrete implementor. Editing those properties restyles the text that carries the style, so the same contract serves both a one-off tweak to a single run and the shared look defined inside a reusable style. Because the properties read and write the live element, a change takes effect the moment it is set. The members group by what they control. The weight-and-emphasis members are booleans: IsBold, IsItalic, and Outline. The font-and-color members carry richer types: TextFont is an IFont, Color is an IColor, Underline is an IUnderline, and Strike is a Nullable<StrikValue>. The spacing-and-language members cover the rest: Spacing is a DocUnit for character spacing, Languages sets the proofing language, and NoProof and SpecVanish are display flags. Two methods round out the surface: Clone copies the style and Reset returns it to defaults, both returning an ITextStyle so a developer can stamp one run's look onto another or wipe a run back to a clean baseline before restyling. The contract also carries StyleId and Status inherited from IDocumentStyle, which track the style's identity within the document.
ITextStyle style = run.TextStyle;
style.IsBold = true;
style.Color = redColor;
The add text how-to places styled text, the paragraph style example formats text, and the slide element tutorial covers slide elements.
Properties
Color
Declaration
IColor Color { get; set; }
Property Value
IsBold
Declaration
bool IsBold { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsItalic
Declaration
bool IsItalic { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Languages
Declaration
string Languages { get; set; }
Property Value
| Type |
Description |
| System.String |
|
NoProof
Declaration
bool NoProof { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Outline
Declaration
bool Outline { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Spacing
Declaration
DocUnit Spacing { get; set; }
Property Value
SpecVanish
Declaration
bool SpecVanish { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Strike
Declaration
Nullable<StrikValue> Strike { get; set; }
Property Value
TextFont
Declaration
IFont TextFont { get; set; }
Property Value
Underline
Declaration
IUnderline Underline { get; set; }
Property Value
Methods
Clone()
Declaration
Returns
Reset()
Declaration
Returns