Hello I am making a WPF appication which has an ObservableCollection that is bound to a TabControl (each tab representing an object within OC). And at the end there is a "+" tab, that adds a new object to that collection. My question is, is it possible to fix the tabs position, so they don't jump when i click on a tab in a different row, because i want the "+" tab to be always on the last position. Thanks.
0
votes
1 Answers
0
votes
Upon clicking + tab to add new object to your ObservableCollection, try to add it at specific position using Insert() function. For example, to make the new item added at position before the last item in collection :
MyCollection.Insert(MyCollection.Count-1, newItem);