Neither of these are exactly how you describe, but may fit your requirements.
Firstly this article
Enhanced EventLog writing for .NET Applications[
^].
Or a simple alternative could be something like this
var sb = new StringBuilder("");
sb.Append(new XElement("MyValue1", "ABCDEFG").ToString());
sb.Append(new XElement("MyValue2", "HIJKLMN").ToString());
sb.Append(new XElement("MyValue3", "OPQRSTU").ToString());
EventLog.WriteEntry("MyProgram", sb.ToString(), EventLogEntryType.Information);
which gave
<EventData>
<Data><MyValue1>ABCDEFG</MyValue1><MyValue2>
HIJKLMN</MyValue2><MyValue3>OPQRSTU</
MyValue3></Data>
</EventData>
Note the
Data
is provided by the EventViewer