public void OnTransitionComplete(UserControl LastControl, UserControl CurrentControl) { //if (this.LastPage != null) //{ // SmartUserControl last = (SmartUserControl)this.LastPage; // //last.TransitionComplete(); //} // remove existing event handlers if (KinectHappyUserControl != null) { KinectHappyUserControl = null; } // turn off the DataContext in all of the controls foreach (var UIPage in UIPages) { UIPage.UserControl.DataContext = null; } KinectHappyUserControl = (SmartUserControl)CurrentControl; this.DataContext = KinectHappyUserControl; if (KinectHappyUserControl == RecordingControl) { HookUpHappyControl(RecordingControl); RecordingControl.Start(); } else if (KinectHappyUserControl == TestControl) { HookUpHappyControl(TestControl); } }
public NavPageInfo(SmartUserControl UserControl, bool Vertical, string About) { this.UserControl = UserControl; this.Vertical = Vertical; this.About = About; }
void HookUpHappyControl(SmartUserControl uc) { KinectHappyUserControl = uc; KinectHappyUserControl.DataContext = KinectViewer; }