private void ShowXmlDialog(string xml) { CustomDialog dialog = new CustomDialog(); XmlViewSingleContent content = new XmlViewSingleContent(); SingleDirectionData data = new SingleDirectionData(); content.DataContext = data; XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); data.Document = doc; dialog.Content = content; dialog.MaxWidth = 800; dialog.AddOkButton(); dialog.AddButton("reformat", Reformat, System.Windows.Input.Key.R, System.Windows.Input.ModifierKeys.Alt, "Reformat"); dialog.Show(); }
private void ShowXmlDialog(string xml) { CustomDialog dialog = new CustomDialog(); XmlViewSingleContent content = new XmlViewSingleContent(); SingleDirectionData data = new SingleDirectionData(); content.DataContext = data; XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); data.Document = doc; dialog.Content = content; dialog.MaxWidth = 800; dialog.AddOkButton(); dialog.AddButton("reformat", Reformat, System.Windows.Input.Key.R, System.Windows.Input.ModifierKeys.Alt, "Reformat"); dialog.Show(); }