AppUpperList.Children.Clear();
AppLowerList.Children.Clear();
- foreach (var item in ItemsSource)
- {
- var viewCell = new AppItemCell();
- viewCell.BindingContext = item;
- viewCell.OnClickedCommand = new Command(() =>
- {
- item.DoAction();
- });
- var index = AppCount / 2;
- viewCell.OnFocusedCommand = new Command(() =>
- {
- ScrollToIndex(index);
- });
-
- if (AppCount % 2 == 0)
- {
- Device.BeginInvokeOnMainThread(() => AppUpperList.Children.Add(viewCell));
- }
- else
- {
- Device.BeginInvokeOnMainThread(() => AppLowerList.Children.Add(viewCell));
- }
-
- AppCount = AppCount + 1;
-
- }
foreach (var item in ItemsSource)
{
var viewCell = new AppItemCell();