IXRColorKeyFrameCollection::Add (Compact 2013)

3/28/2014

This method adds an item to the end of the IXRColorKeyFrameCollection collection and retrieves the index that indicates where it was added.

Syntax

virtual HRESULT STDMETHODCALLTYPE   Add(
    __in IXRColorKeyFrame* pColorKeyFrame,
    __out_opt int* pIndex
) = 0;

Parameters

  • pColorKeyFrame
    [in] Pointer to an IXRColorKeyFrame object that represents an item to add to this collection.
  • pIndex
    [out] Optional. Pointer to an integer value that indicates the zero-based index that describes the location of the item added to this collection.

Return Value

Returns S_OK if successful; otherwise, returns an HRESULT error code. For common error codes for XAML for Windows Embedded , see XAML for Windows Embedded Error Messages.

Because an object cannot exist more than once in a visual tree, an item can occur only once in this object collection. If you attempt to add an item that already exists, the Add method returns XR_E_COLLECTION_ELEMENT_ALREADY_ASSOCIATED.

.NET Framework Equivalent

System.Windows.PresentationFrameworkCollection(T).Add

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRColorKeyFrameCollection
IXRColorAnimationUsingKeyFrames::GetKeyFrames