private string CovertToHTMLTable()

in Tools/Apps/Microsoft.PowerApps.Tools.AppChangeFinder/ChangeFinderViewModel.cs [437:474]


        private string CovertToHTMLTable()
        {
            StringBuilder htmlStr = new StringBuilder();
            htmlStr.Append("<table style=\"font-family: arial,sans-serif; border-collapse:collapse; width:100%;\">");
            foreach (var item in ScreenList)
            {
                htmlStr.AppendFormat("<tr style=\"border-bottom-width:1px; border-bottom-color:#dddddd; border-bottom-style:solid\">");
                htmlStr.AppendFormat("<td width=\"10% \">{0}</td>", item.ScreenName);
                htmlStr.AppendFormat("<td width=\"90% \">");
                htmlStr.AppendFormat("<table width=\"100% \">");
                foreach (var controlitem in item.Controls)
                {
                    htmlStr.AppendFormat("<tr style=\"border-bottom-width:1px; border-bottom-color:#dddddd; border-bottom-style:solid\">");
                    htmlStr.AppendFormat(           "<td width=\"15% \">{0}</td>", controlitem.ControlName);
                    htmlStr.AppendFormat(           "<td width=\"85% \">");
                    htmlStr.AppendFormat(               "<table width=\"100% \">");
                    foreach (var propertyitem in controlitem.Properties)
                    {
                        htmlStr.AppendFormat(               "<tr style=\"border-bottom-width:1px; border-bottom-color:#dddddd; border-bottom-style:solid\">");
                        htmlStr.AppendFormat(                   "<td width=\"15% \">{0}</td>", propertyitem.PropertyName);
                        foreach (var property in propertyitem.Properties)
                        {
                            htmlStr.AppendFormat(           "<td style=\"width=25%;background-color : #{1} \">{0}</td>", property.Value, property.IsBaseLine? "CEF37E": "FFA7A7");
                        }
                        htmlStr.AppendFormat(                   "<td width=\"35% \">{0}</td>", propertyitem.Comments);
                        htmlStr.AppendFormat(               "</tr>");
                    }
                    htmlStr.AppendFormat(               "</table>");
                    htmlStr.AppendFormat("          </td>");
                    htmlStr.AppendFormat("      </tr>");
                }
                htmlStr.AppendFormat("  </table>");
                htmlStr.AppendFormat("</td>");
                htmlStr.AppendFormat("</tr>");
            }
            htmlStr.Append("</table>");
            return htmlStr.ToString();
        }