public Frame() { var backStack = new ObservableCollection <PageStackEntry>(); var forwardStack = new ObservableCollection <PageStackEntry>(); backStack.CollectionChanged += (s, e) => CanGoBack = BackStack.Any(); forwardStack.CollectionChanged += (s, e) => CanGoForward = ForwardStack.Any(); BackStack = backStack; ForwardStack = forwardStack; }
public Frame() { var backStack = new ObservableCollection <PageStackEntry>(); var forwardStack = new ObservableCollection <PageStackEntry>(); backStack.CollectionChanged += (s, e) => { CanGoBack = BackStack.Any(); BackStackDepth = BackStack.Count; }; forwardStack.CollectionChanged += (s, e) => CanGoForward = ForwardStack.Any(); BackStack = backStack; ForwardStack = forwardStack; DefaultStyleKey = typeof(Frame); }