public void Navigate(UserControl nextPage, object state) { this.kinectRegion.Content = nextPage; ISwitchable s = nextPage as ISwitchable; if (s != null) { s.UtiliseState(state); } else { throw new ArgumentException("NextPage is not ISwitchable! " + nextPage.Name.ToString()); } }
internal void Navigate(UserControl newPage, object state) { pageHolder.Child = newPage; ISwitchable s = newPage as ISwitchable; if (s != null) { s.UtiliseState(state); } else { throw new ArgumentException("New page " + newPage.Name.ToString() + "is not ISwitchable"); } }