locked
How to get the index of stackPanel element at runtime RRS feed

  • Question

  • When I click a button inside my element in the stackPanel I want to set its position at -1 index. Why this code gives my the index of my element li -1?

    StackPan.Children.Remove(li);
    StackPan.Children.Insert(StackPan.Children.IndexOf(li) - 1, li);

    Friday, December 7, 2012 9:32 AM

Answers