Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

270
Vistas
How to add attributes color, font-weight, font-style and text-align inside of c# and using method Replace

I have this piece of code:

enter else
{
    rowData = rowData.Equals("False") || rowData.Equals("True") ? rowData.Replace("False", "No").Replace("True", "Yes") : rowData;
    rowData = rowData.Replace("<img", $"<img width='{contentWidth}' height='100%' ");
    rowData = rowData.Replace("font-size:", "").Replace("font-family:", "");
    rowData = $"<div style= 'font-size:{builder.Font.Size}pt;font-family:{builder.Font.Name};'>{rowData}</div>";
    builder.InsertHtml(rowData);
} 

But, I need to make changes in attributes color, font-weight, font-style and text-align as well. For color, for example, I tried .Replace("color:","") and in the next line color:{builder.Font.Color};, but I did get it.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda