Exemplo n.º 1
0
 private void AddUsersHandle(System.Collections.Generic.List<IDKin.IM.Protocol.Account.User> users)
 {
     if (users != null && users.Count > 0)
     {
         bool isOdd = true;
         foreach (IDKin.IM.Protocol.Account.User user in users)
         {
             SearchResultItem item = new SearchResultItem();
             item.InitItemData(user);
             this.windowModel.ResultWindow.resultList.Items.Add(item);
             isOdd = this.SetResultItemBG(item, isOdd);
         }
     }
 }
Exemplo n.º 2
0
 private bool SetResultItemBG(SearchResultItem item, bool isOdd)
 {
     if (isOdd)
     {
         item.canvas.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255));
     }
     else
     {
         item.canvas.Background = new SolidColorBrush(Color.FromRgb(238, 253, 255));
     }
     return !isOdd;
 }