Export (0) Print
Expand All
Expand Minimize

UI Element

Defines a UI—how it appears visually, how it behaves, and how it interacts with code/data objects.

Syntax

<UI
    BaseUI="string"
    Flippable="{true | false}"
    Name="string"
>
    <Content />
    <Locals />
    <Properties />
    <Rules />
</UI>

Attributes

BaseUI

Contains the base UI configuration from which this UI will inherit all properties, rules, and content.

Content

Specifies the type of content item, which must be one of the following elements (only one direct child of a Content element is allowed):

Clip

ColorFill

Graphic

Host

NowPlaying

Panel

Repeater

Scroller

Text

Video

Flippable

Specifies whether this UI should mirror on right-to-left (RTL) systems. If content is specified in the derived class, that content will entirely replace the content of the same name defined in the base class of the same name.

Locals

Specifies a set of private objects for use by the UI. A local consists of a type, a name, and a value. A local can be any type. Every instance of the UI will get its own instance of the locals. Use these variables when you need to store data pertinent to the scope of the current UI element only.

The following child elements are typical, but not limited to this set:

ArrayListDataSet

BooleanChoice

BooleanTransformer

ByteRangedValue

Choice

ClickHandler

Command

DateTimeTransformer

EditableText

Environment

FormatTransformer

GesturePanHandler

GestureRatchetSettings

GestureInertiaSettings

GesturePanLockAxis

IntRangedValue

KeyHandler

ListDataSet

MathTransformer

MediaCollection

ModelItem

MouseWheelHandler

PropertySet

RangedValue

ResourceGroup

ScrollingData

ScrollingHandler

SecureTypingHandler

ShortcutHandler

Timer

TimeSpanTransformer

TypingHandler

Name

Specifies the name of the UI markup.

Properties

Specifies a set of input parameters to the UI. A property consists of a type, a name, and a default value. A property can be any type. Property defaults are shared among all instances of the UI markup; set properties when you want to parameterize values for a particular UI to be used by other UIs.

The following child elements are typical, but not limited to this set:

AnchorEdge

AnchorLayoutInput

Animation

ArrayListDataSet

BooleanChoice

ByteRangedValue

Choice

Color

Command

DockLayoutInput

EditableText

Font

FormLayoutInput

GesturePanHandler

GestureRatchetSettings

GestureInertiaSettings

GesturePanLockAxis

ICommand

Image

IModelItem

Index

Inset

IntRangedValue

ITransformer

ITransformerEx

ITransformer

IValueRange

ListDataSet

MajorMinor

ModelItem

Point

PropertySet

RangedValue

Rectangle

ResourceGroup

Rotation

ScrollingData

Size

Sound

Timer

Vector3

VirtualList

If additional properties are specified in the derived class, those values will override any of the same name in the base class.

You can use the ArrayListDataSet class to populate a list from markup.

Rules

Specifies a set of rules that provides priority-based data binding services. Rules have sources and targets. Rules can be condition-based, where the rule will not apply unless the conditions evaluate to true. Rules are priority-based in that the first rule has highest priority.

Includes any of the following elements to define the conditions of the rule:

Binding

Changed

Condition

Default

Rule

If rules are specified in the derived class, those rules will be appended to the list of rules specified by the base class.

Remarks

A UI is a self-contained and reusable component that can be used to create something as simple as a button and as complex as a top-level form. A UI element can only exist as a child of an Mcml element and must be named. If there are multiple UI elements in an MCML document, the first UI element is displayed.

Requirements

Platform: Windows Vista Ultimate, Windows Vista Home Premium, and later

See Also

Show:
© 2014 Microsoft