/// <summary>
        /// Construct a new DocumentationBrowserView given an appropriate viewmodel.
        /// </summary>
        /// <param name="viewModel">The ViewModel to use as source of events and content.</param>
        public DocumentationBrowserView(DocumentationBrowserViewModel viewModel)
        {
            InitializeComponent();
            this.DataContext = viewModel;
            this.viewModel   = viewModel;

            // subscribe to the link changed event on the view model
            // so we know when to navigate to a new documentation page/document
            viewModel.LinkChanged += NavigateToPage;

            // handle browser component events & disable certain features that are not needed
            this.documentationBrowser.AllowDrop   = false;
            this.documentationBrowser.Navigating += ShouldAllowNavigation;
        }
Ejemplo n.º 2
0
 public DocumentationBrowserViewExtension()
 {
     // initialise the ViewModel and View for the window
     this.ViewModel   = new DocumentationBrowserViewModel();
     this.BrowserView = new DocumentationBrowserView(this.ViewModel);
 }