Note that there are some explanatory texts on larger screens.

plurals
  1. POFormat string in ICS Fle (Set font for ICS file)
    text
    copied!<p>I am Creating ICS file fromC# WPF application and using the following code to generate ICS file.</p> <pre><code>StreamWriter writer; writer = new StreamWriter(filePath); writer.WriteLine("BEGIN:VCALENDAR"); writer.WriteLine("VERSION:2.0"); writer.WriteLine("PRODID:MyApp"); writer.WriteLine("CALSCALE:GREGORIAN"); writer.WriteLine("METHOD:PUBLISH"); writer.WriteLine("BEGIN:VEVENT"); string startDateTime = Convert.ToDateTime(appointmentDetails.StartDate).ToString("yyyyMMdd'T'HHmmss"); string endDateTime = Convert.ToDateTime(appointmentDetails.EndDate).ToString("yyyyMMdd'T'HHmmss"); writer.WriteLine("DTSTART:" + startDateTime); writer.WriteLine("DTEND:" + endDateTime); writer.WriteLine(@"DESCRIPTION:" + appointmentDetails.Body); writer.WriteLine("SUMMARY:" + appointmentDetails.Subject); writer.WriteLine("END:VEVENT"); writer.WriteLine("END:VCALENDAR"); writer.Close(); </code></pre> <p>But I have some problems while fromating the description.I think when I add \n for new line ,it creates a problem. I need to format my string like this.</p> <pre><code>------------------ Header1 ----------------- bOdy1 contents --------------- </code></pre> <p>I am using the following line to create a dotted line.</p> <pre><code>result += new String('-', characterLength) + "\\n"; </code></pre> <p>But the out put showing one line instead of dotted line.I think “\n” creates the problem.when I add some space after the new line escape character I can see the problem solved.Is there any better/alternate solution for this?</p> <p>Some string in the description showing in different font style.How can Make it unique?</p> <p>How can I set the font for this ICs file from the C#?</p> <p>Please suggest.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload