I wanted to encapsulate the behavior of the pivot element inside the view class. Apparently, SelectionChanged rotates through each rotation element during startup, so I had to do the following:
var frame = App.Current.RootVisual as PhoneApplicationFrame; if (null == frame) //during app load { container = App.Current.RootVisual as MainPage; } else //during pivot event; { container = frame.Content as MainPage; }
A container is defined as a closed container MainPage = null; Weird
Esa
source share