非公共成员访问Windows商店

时间:2016-01-03 12:00:56

标签: c# gridview windows-store-apps

我想在Windows应用商店中访问非公开会员,但我不能。

enter image description here

我想访问图片中的“元素”

我有GridView绑定到集合以进行分组,如下所示

private void gridview_1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    slidein_history_of_illness.DataContext = (sender as GridView).SelectedItem;
    object obj = (sender as GridView).SelectedItem;
}

ItemSource的{​​{1}}为GridView

GridViewItemSoure

1 个答案:

答案 0 :(得分:0)

我解决了!

我用这行来访问元素!

private void gr_SelectionChanged(object sender, SelectionChangedEventArgs e)
  {
    object obj = (sender as GridView).SelectedItem;
    IGrouping<string, object> groupCast = obj as System.Linq.IGrouping<string, object>;
    foreach (Item item in groupCast)
       {
          //to do staff
       }
  }