private void OnListViewLoaded(object sender, ListViewLoadedEventArgs e)
        {
            var container = listView.GetVisualContainer();
            var extent    = (double)container.GetType().GetRuntimeProperties().FirstOrDefault(x => x.Name == "TotalExtent").GetValue(container);

            listView.HeightRequest = extent;
        }
Ejemplo n.º 2
0
        private void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
        {
            listView.CollapseAll();
            var group = listView.DataSource.Groups[0];

            listView.ExpandGroup(group);
        }
 private void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
 {
     if (listView.DataSource.Groups.Count > 0)
     {
         listView.ExpandGroup(listView.DataSource.Groups[0]);
     }
 }
Ejemplo n.º 4
0
 private void ListView_OnLoaded(object sender, ListViewLoadedEventArgs e)
 {
     Device.BeginInvokeOnMainThread(async() =>
     {
         await Task.Delay(100);
         listView.RefreshListViewItem(0, _viewModel.ColorsObservableCollection.Count, true);
     });
 }
Ejemplo n.º 5
0
        private void Loaded(object sender, ListViewLoadedEventArgs e)
        {
            if (!(sender is SfListView listView))
            {
                return;
            }

            _bindingContext = listView.BindingContext;
        }
        /// <summary>
        ///     Invoked when the list view is loaded.
        /// </summary>
        /// <param name="sender">The SfListView</param>
        /// <param name="e">ListView Loaded Event Args</param>
        private void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
        {
            var scrollView = listView.Parent as ScrollView;

            listView.HeightRequest = scrollView.Height;

            ((LinearLayout)listView.LayoutManager).ScrollToRowIndex(
                listView.DataSource.DisplayItems.Count - 1, ScrollToPosition.End, true);
        }
        private void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
        {
            var displayItems = listView.DataSource.DisplayItems.Where(o => (o as GroupResult) != null);

            this.listView.LayoutManager = new GridLayout()
            {
                SpanCount = displayItems.Max(o => (o as GroupResult).Items.ToList <object>().Count())
            };
        }
        /// <summary>
        /// Invoked when the list view is loaded.
        /// </summary>
        /// <param name="sender">The SfListView</param>
        /// <param name="e">ListView Loaded Event Args</param>
        private void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
        {
            ScrollView scrollView = this.listView.Parent as ScrollView;

            this.listView.HeightRequest = scrollView.Height;

            ((LinearLayout)this.listView.LayoutManager).ScrollToRowIndex(
                this.listView.DataSource.DisplayItems.Count - 1, Syncfusion.ListView.XForms.ScrollToPosition.End, true);
        }
Ejemplo n.º 9
0
 private async void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
 {
     ListView.HeightRequest = scrollView.Height;
     if (Device.RuntimePlatform == Device.macOS)
     {
         Device.BeginInvokeOnMainThread(() =>
         {
             ListView.ScrollTo(2500);
         });
     }
     else
     {
         (ListView.LayoutManager as LinearLayout).ScrollToRowIndex(DataTemplateSelectorViewModel.MessageInfo.Count - 1, Syncfusion.ListView.XForms.ScrollToPosition.Start);
     }
     await Task.Delay(500);
 }
Ejemplo n.º 10
0
 private void Bindable_Loaded(object sender, ListViewLoadedEventArgs e)
 {
     listView.DataSource.LiveDataUpdateMode = LiveDataUpdateMode.AllowDataShaping;
     listView.DataSource.GroupDescriptors.Add(
         new GroupDescriptor()
     {
         PropertyName = "ContactName",
         KeySelector  = (object obj1) =>
         {
             var item = (obj1 as Contacts);
             return(item.ContactName[0].ToString());
         }
     });
     listView.DataSource.SortDescriptors.Add(
         new SortDescriptor()
     {
         PropertyName = "ContactName"
     });
 }
Ejemplo n.º 11
0
        /// <summary>
        /// Invoked when the list view is loaded.
        /// </summary>
        /// <param name="sender">The SfListView</param>
        /// <param name="e">ListView Loaded Event Args</param>
        private void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
        {
            //ScrollView scrollView = this.listView.Parent as ScrollView;
            //this.listView.HeightRequest = scrollView.Height;

            Device.BeginInvokeOnMainThread(() =>
            {
                listView.IsVisible = false;

                ((LinearLayout)this.listView.LayoutManager).ScrollToRowIndex(
                    this.listView.DataSource.DisplayItems.Count - 1, Syncfusion.ListView.XForms.ScrollToPosition.End, true);

                listView.IsVisible = true;
            });

            //((LinearLayout)this.listView.LayoutManager).ScrollToRowIndex(
            //this.listView.DataSource.DisplayItems.Count - 1,  true);

            //(listView.LayoutManager as LinearLayout).ScrollToRowIndex(listView.DataSource.DisplayItems.Count() - 1, true);
        }
Ejemplo n.º 12
0
        private void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
        {
            //Creating new label based on the group header key value after loading

            var groupcount = this.ListView.DataSource.Groups.Count;
            var items      = ListView.DataSource.Groups.ToList <GroupResult>().OrderBy(o => o.Key);

            for (int i = 0; i < groupcount; i++)
            {
                label = new Label();
                GroupResult group = items.ElementAt(i);
                label.Text = group.Key.ToString();
                indexPanelGrid.Children.Add(label, 0, i);
                var labelTapped = new TapGestureRecognizer()
                {
                    Command = new Command <object>(OnTapped), CommandParameter = label
                };
                label.GestureRecognizers.Add(labelTapped);
            }
        }
Ejemplo n.º 13
0
 private void HorizontalSampleListView_Loaded(object sender, ListViewLoadedEventArgs e)
 {
     horizontalListView.LayoutManager.ScrollToRowIndex(scrollToIndex - 1, true);
 }
Ejemplo n.º 14
0
 private void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
 {
     listView.CollapseAll();
 }
Ejemplo n.º 15
0
 private void SfItems_Loaded(object sender, ListViewLoadedEventArgs e)
 {
     (sender as SfListView).CollapseAll();
 }
        private async void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
        {
            await Task.Delay(2000);

            ListView.RefreshView();
        }
Ejemplo n.º 17
0
 private void Listview_Loaded(object sender, ListViewLoadedEventArgs e)
 {
     popupLayout.PopupView.WidthRequest = listview.Width;
     container = listview.GetType().GetTypeInfo().GetDeclaredProperty("VisualContainer").GetValue(listview) as VisualContainer;
 }
Ejemplo n.º 18
0
 private void ListView_Loaded(object sender, ListViewLoadedEventArgs e)
 {
     flag = true;
 }