ImageGear .NET v25.0 - Updated
fontStyle Property

ImageGear.Web.UI Library > ImageGear.Web.UI Namespace > Mark class : fontStyle Property
Specifies the font characteristics to use for text marks.
Syntax
ASP.NET Ajax Javascript (Specification) 
function get_fontStyle() : FontStyle
function set_fontStyle(value : FontStyle)
ASP.NET Ajax Javascript (Usage) 
var resultVar = instanceOfMark.get_fontStyle();
Example

This JavaScript code will create the mark shown in the image on this page.

// Create a new text mark.
var mark = new ImageGear.Web.UI.Mark(ImageGear.Web.UI.MarkType.Text);

// Set various properties.
mark.set_rectangle({ x: 100, y: 150, width: 275, height: 75 });
mark.set_text('This is a text mark.\nIt has two lines of text.');
mark.set_fontName('Arial');
mark.set_fontSize(14);
mark.set_fontStyle(ImageGear.Web.UI.FontStyle.Underline | ImageGear.Web.UI.FontStyle.Italic);
mark.set_textHorizontalAlignment(ImageGear.Web.UI.HorizontalAlignment.Center);
mark.set_textColor('#7070ff');

// Add the mark to the page.
// Adding it after setting the properties avoids a lot of needless markChanged events.
$find('PageView1').get_artPage().addMark(mark);
Remarks

This property specifies the font characteristics (such as italics, bold, or underline) to use for text marks. If you change the value of this property, this object will raise its propertyChanged event.

This figure shows a text mark whose text is underlined and italic.

Mark types: This property is valid for Text marks.
Valid values: Any member or combination of members of the FontStyle enumeration.
Default value: ImageGear.Web.UI.FontStyle.Regular

ImageGear for .NET name: FontStyleART
NotateXpress (version 10) name: TextFont

See Also

Reference

Mark class
Mark Members