First method

ResourceDictionary.First method

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 (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows::UI::Xaml

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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:
© 2016 Microsoft