Пример #1
0
 /// <summary>
 /// Handles the NavigateTarget event raised by the view model to navigate to an open document.
 /// </summary>
 /// <param name="sender">The view model.</param>
 /// <param name="e">Navigation target.</param>
 protected void NavigateTarget(object sender, NavigationTarget e)
 {
     ViewContext.NavigationManager.NavigateDocumentRegion(e.NavigationId);
 }
Пример #2
0
        /// <summary>
        /// Called to publish a new document. Calls the <see cref="Publish"/> 
        /// event which is handled on the <see cref="ViewBase"/>.
        /// </summary>
        /// <param name="navigationSettings">Navigation settings for the new document.</param>
        protected void PublishDocument(NavigationSettings navigationSettings)
        {
            var publish = Publish;
            if (publish != null)
            {
                var navigationTarget = new NavigationTarget(navigationId, Title);
                if (navigationHistory.Count > 0)
                {
                    navigationTarget.AppendNavigationHistory(navigationHistory.Select(t => t.Target).ToArray());
                }

                navigationSettings.NavigationHistory = navigationTarget.NavigationHistory;
                publish(this, navigationSettings);
            }
        }