IXRColumnDefinitionCollection (Compact 2013)
3/28/2014
This class provides access to a strongly typed collection of IXRColumnDefinition objects.
Syntax
class IXRColumnDefinitionCollection : public IXRDependencyObject
Inheritance Hierarchy
IXRColumnDefinitionCollection
Methods
Method |
Description |
---|---|
Adds an item to the end of this collection and retrieves the index of where it was added. |
|
Removes all items from this collection. |
|
Determines whether an item is in this collection. |
|
Retrieves the number of items in this collection. |
|
Retrieves the item at the specified index in this collection. |
|
Searches for the specified item and retrieves the zero-based index of its occurrence in this collection. |
|
Inserts an item into this collection at the specified index value. |
|
Removes a specific item from this collection. |
|
Removes the item at the specified index from this collection. |
Thread Safety
For the best performance, use members of this class on a single thread. If you must access objects on multiple threads, you must also protect the objects using synchronization primitives such as lock, mutex, and semaphore.
If necessary, when creating your visual host and prior to using this class, you can call IXRApplication::CreateHostFromXaml and supply it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true. This instructs XAML for Windows Embedded to keep the entire application thread-safe on your behalf. However, this practice can have undesirable performance side effects because the UI thread might be blocked by work going on in a background thread.
Remarks
If you create a new IXRColumnDefinition object in C++ code by using IXRApplication::CreateObject(IID,Object), you must insert it into the visual tree by adding it to an IXRColumnDefinitionCollection in the visual tree.
To obtain a pointer to this collection, call IXRGrid::GetColumnDefinitions. Then, use the methods of this class to add, remove, or retrieve items. You can also clear the complete collection by calling the IXRColumnDefinitionCollection::Clear method.
When you create a class instance, use an IXRColumnDefinitionCollectionPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.
You can define a column definition 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 Grid.ColumnDefinitions Property on MSDN.
The XAML implicit collection syntax in the Grid.ColumnDefinitions topic shows how to populate items in XAML for the IXRColumnDefinitionCollection that the Grid.ColumnDefinitions property holds.
.NET Framework Equivalent
System.Windows.Controls.ColumnDefinitionCollection
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |
See Also
Reference
Classes for Collection Management
IXRGrid::GetColumnDefinitions