private void OnGoBack(object parameter) { FloorPlannerViewModel VM = this.DataContext as FloorPlannerViewModel; VM.GoBack = null; this.DataContext = null; //Frame.GoBack(); }
public FloorPlannerDemo() { InitializeComponent(); this.Template = this.Resources["ChromelessWindowTemplate"] as ControlTemplate; FloorPlannerViewModel floor = new FloorPlannerViewModel(); floor.GoBack = new DelegateCommand <object>(OnGoBack); this.DataContext = floor; }