using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.IO;

namespace WPF_Sample.Views
{
    /// <summary>
    /// Interaction logic for About.xaml
    /// </summary>
    public partial class Overview : Page
    {
        public Overview()
        {
            InitializeComponent();

            string curDir = Directory.GetCurrentDirectory();
            webBrowser1.Source = new Uri(String.Format("file:///{0}/Help/Overview.html", curDir),UriKind.RelativeOrAbsolute );
        }

        private void webBrowser1_LoadCompleted(object sender, NavigationEventArgs e)
        {
            var html = webBrowser1.Document as mshtml.HTMLDocument;
            var height = html.body.offsetHeight;
            webBrowser1.MinHeight = height;
        }
    }
}
