J'ai du code XML à afficher. Ce serait parfait si je pouvais utiliser WebBrowser pour afficher xml comme IE le fait. Il a la coloration syntaxique et les noeuds peuvent s'effondrer.Comment puis-je utiliser WebBrowser pour afficher XML
Cela fonctionne:
WebBrowser browser = (WebBrowser)this.GetTemplateChild("PART_Browser");
browser.NavigateToString("<html>hello</html>");
Cependant cela ne veut pas:
WebBrowser browser = (WebBrowser)this.GetTemplateChild("PART_Browser");
browser.NavigateToString("<?xml version="1.0" encoding="utf-16"?><ArrayOfResultSet xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Search.Shared.Results"><ResultSet><Name>Bing</Name>...</xml>");
Comment puis-je obtenir WebBrowser pour afficher XML comme Internet Explorer?
cela devrait aider: http://www.codeproject.com/KB/XML/XMLBrowser.aspx – cichy
@cichy vous devriez poster votre commentaire comme réponse, parce que c'est ce que Steven recherche. –
@cichy Cela ne fonctionne pas pour WPF. –