void Init(JournalItem sender) { flipView.Items.Clear(); int selectedIndex = 0; int count = 0; foreach (var i in App.AppDataFile.Items[sender.Groups]) { var item = new FlipViewItemDetailPage(i); item.Tag = i; if (i.ImageUri == sender.ImageUri) selectedIndex = count; flipView.Items.Add(item); count++; } try { flipView.SelectedIndex = selectedIndex; } catch (Exception) { } }
void Init(JournalItem sender) { flipView.Items.Clear(); int selectedIndex = 0; int count = 0; foreach (var i in App.AppDataFile.Items[sender.Groups]) { var item = new FlipViewItemDetailPage(i); item.Tag = i; if (i.ImageUri == sender.ImageUri) { selectedIndex = count; } flipView.Items.Add(item); count++; } try { flipView.SelectedIndex = selectedIndex; } catch (Exception) { } }