示例#1
0
 private void OnGroupPickerItemTap(object sender, Telerik.Windows.Controls.GroupPickerItemTapEventArgs e)
 {
     foreach (DataGroup group in LstMediaItems.Groups)
     {
         if (object.Equals(DateTime.Parse(Convert.ToString(e.DataItem)), group.Key))
         {
             e.DataItemToNavigate = group;
             return;
         }
     }
 }
示例#2
0
        private void JumpListAll_GroupPickerItemTap(object sender, Telerik.Windows.Controls.GroupPickerItemTapEventArgs e)
        {
            var keys         = JumpListAll.Groups.Select(it => ((MonthGroup)it.Key).MonthIndex).ToList();
            var nextKeyQuery = _model.ContactGroups.Where(it => it.MonthIndex >= ((MonthGroup)e.DataItem).MonthIndex).Select(it => it.MonthIndex);
            var nextKey      = nextKeyQuery.Any() ? nextKeyQuery.Min() : _model.ContactGroups.Select(it => it.MonthIndex).Min();

            while (!JumpListAll.Groups.Select(it => ((MonthGroup)it.Key).MonthIndex).Contains(nextKey))
            {
                _model.LoadNextContacts();
                JumpListAll.RefreshData();
            }
            foreach (DataGroup group in JumpListAll.Groups)
            {
                if (object.Equals(nextKey, ((MonthGroup)group.Key).MonthIndex))
                {
                    e.ClosePicker        = true;
                    e.ScrollToItem       = true;
                    e.DataItemToNavigate = group;
                    return;
                }
            }
        }