using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Markup.Xaml;
using EdTestEmulator.ViewModels;
using System;
using System.Diagnostics;
using TheArtOfDev.HtmlRenderer.Avalonia;

namespace EdTestEmulator;

public partial class DocumentWindow : Window
{
    public DocumentWindow()
    {
        InitializeComponent();
    }

    protected override void OnDataContextChanged(EventArgs e)
    {
        base.OnDataContextChanged(e);

        //this.GetControl<HtmlControl>("HtmlViewControl").RenderError += (sender, e) => { Debug.WriteLine("OOPS"); };
        //this.GetControl<HtmlControl>("HtmlViewControl").Text = (this.DataContext as DocumentWindowViewModel).HtmlResult;
    }
}