This is a migrated thread and some comments may be shown as answers.

Xamarin RadListView PressedItemStyle activating when tapping on whitespace outside of Listview

2 Answers 34 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Brenden
Top achievements
Rank 1
Veteran
Brenden asked on 09 Feb 2021, 04:42 PM
We have a RadListView that holds a list of items and have set the pressed state so that when you press it, the row highlights 

<telerikDataControls:RadListView.PressedItemStyle>
               <telerikListView:ListViewItemStyle
                   BackgroundColor="{Binding SongListRowSelectionColor}"
                   BorderColor="{x:Static SongListRowGreyLine}"
                   BorderLocation="Bottom"
                   BorderWidth="1" />
           </telerikDataControls:RadListView.PressedItemStyle>
           <telerikDataControls:RadListView.SelectedItemStyle>
               <telerikListView:ListViewItemStyle
                   BackgroundColor="Transparent"
                   BorderColor="{x:Static SongListRowGreyLine}"
                   BorderLocation="Bottom"
                   BorderWidth="1" />
           </telerikDataControls:RadListView.SelectedItemStyle>
           <telerikDataControls:RadListView.ItemStyle>
               <telerikListView:ListViewItemStyle
                   BackgroundColor="Transparent"
                   BorderColor="{x:Static SongListRowGreyLine}"
                   BorderLocation="Bottom"
                   BorderWidth="1" />
           </telerikDataControls:RadListView.ItemStyle>

Above our list we have a blue banner that is a stack layout with a few buttons with space in-between that isn't "clickable"  the problem we are seeing is when you tap the white space (because you miss tapping on the button or something) is that PressedItemStyle activates for all rows within the list view

we don't want this behavior and i wasn't able to find anything related to why this was happening. Just wondering how we can prevent this from happening while keeping the presseditemstyle

 

Thanks

2 Answers, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 09 Feb 2021, 05:07 PM

Hello Brenden,

Please carefully review the important information in the following documentation https://docs.telerik.com/devtools/xamarin/troubleshooting/controls-are-not-appearing 

In summary, make sure the RadListView is not a child/grandchild of StackLayout, ScrollView or in a Grid RowDefinition Height=Auto. Those layout control as parent will break the layout and measure pass of the RadListView.

There is no reason why the RadListView's boundaries are extending the parent container on its own. I can't tell you anything of actionable use unless I see the rest of the page's XAML (the parent controls are absolutely critical).

Further Assistance

If this doesn't work or you have any further trouble, please open a Support Ticket and include the rest of your code https://www.telerik.com/account/support-tickets (Important: Please be sure to include the platform details when you open the ticket, there are form boxes for XF version, Telerik version, platform specifics, etc).

Opening a public forum question can take several days to get an answer, whereas opening a Support Ticket gets you an answer <24 hours (you have priority support). A forum post is a great to share the knowledge with the community, but in your case this seems to an implementation specific problem.

Regards,
Lance | Manager Technical Support
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Brenden
Top achievements
Rank 1
Veteran
answered on 09 Feb 2021, 07:38 PM
I submit a ticket
Tags
ListView
Asked by
Brenden
Top achievements
Rank 1
Veteran
Answers by
Lance | Manager Technical Support
Telerik team
Brenden
Top achievements
Rank 1
Veteran
Share this question
or