Using XAML with BarTender

Extensible Application Markup Language, commonly abbreviated as XAML, is a markup language that allows you to create objects, format text, and layout objects using tags. In BarTender, you can use XAML to modify the appearance of a text object by aligning text in tables, coloring text, or adding images to a text object.

An XAML tag represents an object, which initializes an element in the rich text object. For example, you could use the XAML tag <Rectangle> to insert a rectangle into the object. Objects are always introduced using an opening angle bracket (<), followed by the tag name. Attributes can optionally be added to the object element. To complete the object declaration, use a closing bracket (>). If the tag is not followed by any content, the closing bracket can be replaced with a forward slash, followed by the closing bracket (/>). The following example demonstrates the use of objects with XAML formatting.

<StackPanel>

<Ellipse Stroke="Black" />

</StackPanel>

Each object supports a number of optional attributes, which are properties of the object. Formatting changes are often defined as attributes of an object, since they describe the object. The following example creates an ellipse that has a red background and a black outline.

<Ellipse Background="Red" Stroke="Black" />

When XAML is used in a text object, BarTender takes the XAML and converts it to rich text format (RTF). Because of this conversion, BarTender does not support all applications and features of XAML; it only supports the features available in both XAML and RTF.

In This Section