Questions tagged [xamarin.forms.collectionview]

For questions related to the CollectionView class in Xamarin.Forms projects. When using this tag also include the [xamarin.forms] and [xamarin] tags where possible.

13 questions
2
votes
1 answer

ContentView - Binding Context is set to null

Currently I am playing around with .Net Maui but I maybe it's the same behavior as Xamarin. I've created a simple Search-Control which is based on a ContentView. ObjectSearchControl.xaml
1
vote
1 answer

Xamarin community toolkit TouchEffect.Command not working in CollectionView

I'm trying to have a long press and short press command in a CollectionView. I'm using Xamarin.Community.ToolKit But target ViewModel Command is not being called. TouchEffect works when it's outside of CollectionView. But not when it's inside the…
1
vote
2 answers

CollectionView VisualStateManager can't change selection color

I am trying to customize the selection color of a cell in a CollectionView but no matter how I try it, it's always an ugly grey. I want my item template to have rounded corners, but when I select an item the I see ugly square grey corners behind it,…
1
vote
1 answer

How can I visually make my Selected Item in a CollectionView (Horizontal), show at the center of my screen?

I have a ListView with some items, and when I select one of those items, I am moved to a new page with a Horizontal CollectionView, with my SelectedItem as the item I selected on the page before. I have this part working. My problem is, if the item…
1
vote
1 answer
1
vote
1 answer

CollectionView updating ImageButton scroll repeating UI issue

I've got a CollectionView containing an ImageButton. When the image is pressed I replace a.png with b.png. This is working fine but when I scroll down the list, every 10th item is now showing b.png! If instead of setting the button.source, I called…
KevinUK
  • 5,053
  • 5
  • 33
  • 49
0
votes
1 answer

Best way to load a grouped collection on Xamarin.Forms ListView/CollectionView with incremental loading

What would be the best way to load a grouped collection on Xamarin.Forms ListView/CollectionView with incremental loading? For example, say a collection contains several groups and each group contains a list of items. [ [123, 143, 341234,…
0
votes
2 answers

Is there a way to have 2 different objects following one another in a CollectionView in Xamarin.Forms?

I have a CollectionView that shows a list of Categories object like so: And I'd like to have a list of SubCategories to be listed right after it as if it was the same list. I know CollectionView only takes one item but I wanted to know if there was…
Jimmy
  • 105
  • 15
0
votes
1 answer

How can I add a SelectionChanged in a CollectionView from code?

I would like to call a function when a cell of a Collection View (created in cs) were tapped. Here is the code: new StackLayout { Orientation = StackOrientation.Horizontal, HorizontalOptions = LayoutOptions.FillAndExpand, …
0
votes
1 answer

Object Binding in CollectionView is not working properly with SwipeItem

In my ContentPage XAML file, I have a CollectionView setup like this:
0
votes
0 answers

e.CenterItemIndex turns to 0, each time group is change (OS)

I am using Scrolled event in collectionView for iOS. If CollectionView contains groups, e.CenterItemIndex turns to 0 each time group is changing. Is there any way i can fix this? private void CollectionViewtems_Scrolled(object sender,…
0
votes
1 answer

CollectionView GridItemsLayout Change BackgroundColor of nested Item (Button)

I have a problem concerning a CollectionView with a GridItemsLayout. In my application, I have a StackLayout with a horizontal CollectionView(GridItemsLayout), which contains a Button bound to a certain category. Whenever a button is clicked/tapped,…
0
votes
1 answer

How to use FindByName in CollectionView

How to implement FindByName inside a CollectionView with GestureRecognizers as the call. Please correct if something is wrong. private void ItemTapped(object sender, EventArgs e) { SelectedAmount = (int)0.0f; var grid…