Compartilhar via


IXRTriggerActionCollection (Compact 2013)

3/28/2014

This class represents a collection of IXRTriggerAction derived objects.

Syntax

class IXRTriggerActionCollection : public IXRDependencyObject

Inheritance Hierarchy

IXRDependencyObject

    IXRTriggerActionCollection

Methods

Method

Description

IXRTriggerActionCollection::Add

Adds an item to the end of this collection and retrieves the index of where it was added.

IXRTriggerActionCollection::Clear

Removes all items from this collection.

IXRTriggerActionCollection::Contains

Determines whether an item is in this collection.

IXRTriggerActionCollection::GetCount

Retrieves the number of items in this collection.

IXRTriggerActionCollection::GetItem

Retrieves the item at the specified index in this collection.

IXRTriggerActionCollection::IndexOf

Searches for the specified item and retrieves the zero-based index of its last occurrence within this collection.

IXRTriggerActionCollection::Insert

Inserts an item into this collection at the location that has the specified index value.

IXRTriggerActionCollection::Remove

Removes a specific item from this collection.

IXRTriggerActionCollection::RemoveAt

Removes the item at the specified index from this collection.

Thread Safety

Members of this class are thread safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

The IXREventTrigger class uses the IXRTriggerActionCollection to store IXRTriggerAction derived objects. Each IXRTriggerAction object begins an IXRStoryboard and distributes its animations to their targeted objects and properties.

When you create a class instance, use an IXRTriggerActionCollectionPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

To obtain a pointer to this collection, call IXREventTrigger::GetActions. Then, use the methods of this class to add, remove, or retrieve items. To clear the complete collection, call the IXRTriggerActionCollection::Clear method.

IXREventTrigger is supported by XAML for Windows Embedded, but using this technique is discouraged. For more information, see "Remarks" in IXREventTrigger.

You can define a trigger-action collection in Microsoft Silverlight 3 XAML. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this collection in the source XAML for your application, see the TriggerActionCollection Class on MSDN.

.NET Framework Equivalent

System.Windows.TriggerActionCollection

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Collection Management
IXREventTrigger::GetActions