using System.IO;
using System.Reflection;
using Windows.UI.Xaml.Controls;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace RichTextBoxInstalledFonts
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();
            Assembly asm = typeof(MainPage).GetTypeInfo().Assembly;
            Stream stream = asm.GetManifestResourceStream("RichTextBoxInstalledFonts.Resources.simple.htm");
            var html = new StreamReader(stream).ReadToEnd();
            rtb.Html = html;
            rtbMenu.FontFamilies = InstalledFont.GetFonts();
        }
    }
}
