UIKit.UILabel.AttributedText Property
Sets the text for the label using attributed strings.

Syntax

[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_6_0)]
[get: Foundation.Export("attributedText")]
[get: ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_6_0)]
[set: Foundation.Export("setAttributedText:")]
[set: ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_6_0)]
public virtual Foundation.NSAttributedString AttributedText { get; set; }

Value

The attributed text.

This value can be null.

Remarks

C# Example

var title = new NSAttributedString (
    "Hello, World",
    font: UIFont.FromName ("HoeflerText-Regular", 24.0f),
    foregroundColor: UIColor.Red,
    strokeWidth: 4
);
myLabel.SetAttributedTitle (title, UIControlState.Normal);
	    

Requirements

Namespace: UIKit
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0