private async Task GetLayoutDataAsync() { if (this._groups.Count != 0) { return; } Uri dataUri = new Uri("ms-appx:///DataModel/LayoutData.json"); StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(dataUri); string jsonText = await FileIO.ReadTextAsync(file); JsonObject jsonObject = JsonObject.Parse(jsonText); JsonArray jsonArray = jsonObject["Data"].GetArray(); foreach (JsonValue groupValue in jsonArray) { JsonObject groupObject = groupValue.GetObject(); LayoutDataGroup group = new LayoutDataGroup(groupObject["UniqueId"].GetString(), groupObject["Icon"].GetString(), groupObject["Title"].GetString()); foreach (JsonValue itemValue in groupObject["Items"].GetArray()) { JsonObject itemObject = itemValue.GetObject(); group.Items.Add(new LayoutDataItem(itemObject["UniqueId"].GetString(), itemObject["Title"].GetString(), itemObject["PageType"].GetString(), itemObject["Data"].GetString())); } this.Groups.Add(group); } }