标签: uwp
uwp中是否有一个控件可以将json字符串格式化为更易读?
我的意思是如果我有一个像
我希望控件将其格式化为
答案 0 :(得分:1)
您可以解析字符串。在其中插入一个新行,x:Bind将此方法添加到TextBlock.Text:
x:Bind
TextBlock.Text
private string ParseString(string jsonString) { return jsonString.Replace(",", ",\n").Replace("{", "{\n").Replace("}", "\n}"); }