private StackPanel CreateXmlDeclarationData(XmlDeclaration dec) { var typeName = dec.GetType().Name; var version = string.IsNullOrEmpty(dec.Version) ? string.Empty : dec.Version; var encode = string.IsNullOrEmpty(dec.Encoding) ? string.Empty : dec.Encoding; var standalone = string.IsNullOrEmpty(dec.Standalone) ? string.Empty : dec.Standalone; var items = new List <Tuple <string, string> > { Tuple.Create("Version", version), Tuple.Create("Encoding", encode), Tuple.Create("Standalone", standalone), }; return(CreateMemberData(typeName, items)); }