private void OnTimerTick(object sender, EventArgs e) { if (htmldoc == null) { return; } if (htmldoc.State != HtmlDocumentState.Complete) { return; } ToggleBold.IsChecked = htmldoc.IsBold(); ToggleItalic.IsChecked = htmldoc.IsItalic(); ToggleUnderline.IsChecked = htmldoc.IsUnderline(); ToggleSubscript.IsChecked = htmldoc.IsSubscript(); ToggleSuperscript.IsChecked = htmldoc.IsSuperscript(); ToggleBulletedList.IsChecked = htmldoc.IsBulletsList(); ToggleNumberedList.IsChecked = htmldoc.IsNumberedList(); ToggleJustifyLeft.IsChecked = htmldoc.IsJustifyLeft(); ToggleJustifyRight.IsChecked = htmldoc.IsJustifyRight(); ToggleJustifyCenter.IsChecked = htmldoc.IsJustifyCenter(); ToggleJustifyFull.IsChecked = htmldoc.IsJustifyFull(); FontFamilyList.SelectedItem = htmldoc.GetFontFamily(); FontSizeList.SelectedItem = htmldoc.GetFontSize(); }