locked
How to use IndexOf() method in WinRT Visual C++ ItemsControls?

    Question

  • How to use the IndexOf() method available in Visual C++(WinRT) ItemsControls like ListView, FlipView? It takes two arguments as follows and returns boolean value.

     IndexOf(Platform::Object^, unsigned int %)


    b00peshkumar
    Friday, September 30, 2011 12:27 PM

Answers

  • Think of it as an out parameter. Example use:

    unsigned int index;
    if(ItemListView->Items->IndexOf(someObj, index))
    {
      // item found, use index as needed
    }


    http://blog.voidnish.com
    • Marked as answer by Boopesh Kumar Wednesday, October 05, 2011 3:37 AM
    Friday, September 30, 2011 2:16 PM