Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long tap event with FlowListView #291

Open
jamesingreersc opened this issue May 14, 2020 · 0 comments
Open

Long tap event with FlowListView #291

jamesingreersc opened this issue May 14, 2020 · 0 comments

Comments

@jamesingreersc
Copy link

Hi All,
I saw this previous post here #186
but never saw an answer.

They were 3 links given but none of them will work.
https://alexdunn.org/2017/12/27/xamarin-tip-xamarin-forms-long-press-effect/
https://github.com/ice-j/LongPressGesture
https://github.com/mrxten/XamEffects

This is code I inherited from another developer and have to get a long tap event on a thumbnail page.
When I try an Effect or Custom Renderer I can get a long tap but that seems to short circuit the FlowItemTappedCommand which stops working. I can do a single tap in the custom renderer but there is a lot of existing code wrapped around FlowItemTappedCommand working. Below is the xaml code I am using. If anyone has any pointers I would certainly appreciate it.

        <controls:FlowListView
            Grid.Row                               ="5"
            Grid.Column                            ="2"
            BackgroundColor                        ="Transparent"
            FlowColumnMinWidth                     ="100"
            FlowItemTappedCommand                  ="{Binding Selected}"
            FlowItemsSource                        ="{Binding Thumbnails}"
            FlowLastTappedItem                     ="{Binding LastTappedItem}"
            HasUnevenRows                          ="True"
            SeparatorVisibility                    ="None">
            <controls:FlowListView.FlowColumnTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height  ="35" />
                            <RowDefinition Height  ="*" />
                        </Grid.RowDefinitions>
                        <Image x:Name              ="ThumbnailImage"
                            Grid.RowSpan           ="2"
                            Grid.ColumnSpan        ="2"
                            Margin                 ="3.85"
                            Aspect                 ="AspectFill"
                            BackgroundColor        ="Transparent"
                            HeightRequest          ="100"
                            Source                 ="{Binding Source}"
                            WidthRequest           ="100" >
                        </Image>
                    </Grid>
                </DataTemplate>
            </controls:FlowListView.FlowColumnTemplate>
        </controls:FlowListView>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant