Esempio n. 1
0
 private void InitializeProperty()
 {
     ShapeType  = _shape.ShapeType;
     Tooltip    = _shape.Tooltip;
     IsDisabled = _shape.IsDisabled;
     Name       = _shape.Name;
     RichText   = HtmlFromXamlConverter.TransformXamlToHtml(_shape.RichText);
     Text       = _shape.Text;
 }
Esempio n. 2
0
        public static string GetHtmlTextFromRichText(string richText)
        {
            try
            {
                string htmlText = HtmlFromXamlConverter.TransformXamlToHtml(richText);
                htmlText = htmlText.Replace(@"'", @"\'");
                htmlText = ReplaceNewLineWithBRTag(htmlText);
                return(htmlText);
            }
            catch (Exception exp)
            {
                System.Diagnostics.Debug.WriteLine("Convert rich text to html text error : " + exp.ToString());
            }

            return(string.Empty);
        }