ResourceDictionary.First method

Applies to Windows and Windows Phone

Returns an iterator for the items in the collection.

Syntax


public:
IIterator<IKeyValuePair>^ First()

Parameters

This method has no parameters.

Return value

Type: IIterator<IKeyValuePair>

The iterator. The iterator's current position is at the 0-index position, or at the collection end if the collection is empty.

Remarks

You can iterate through a ResourceDictionary in C# or Microsoft Visual Basic. In many cases, such as using foreach syntax, the compiler does this casting for you and you won't need to cast to IEnumerable<KeyValuePair> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable<T> with a KeyValuePair<Object,Object> constraint.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows::UI::Xaml

Metadata

Windows.winmd

See also

ResourceDictionary
ResourceDictionary and XAML resource references

 

 

Show:
© 2014 Microsoft