CATextLayer.AttributedString Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the attributed string to display.
public Foundation.NSAttributedString AttributedString { get; set; }
member this.AttributedString : Foundation.NSAttributedString with get, set
Property Value
Remarks
This sets the attributed string to display on the layer. The attributed string should contain CoreText attributes.
void DrawHelloWorld (CATextLayer myTextLayer)
{
var hello = new NSAttributedString ("Hello, world",
new CTStringAttributes () {
ForegroundColorFromContext = true,
Font = new CTFont ("Arial", 24)
});
myTextLayer.AttributedString = hello;
}