Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

PanGestureRecognizer - no event fired

$
0
0

Hello folks!

I'm having trouble getting the PanGestureRecognizer to work. The recognizer is added to a FlexLayout in a custom control. This is the control's control template:

 <ControlTemplate x:Key="controltemplates/jumplist">
    <Grid>
        <ContentPresenter />
        <FlexLayout x:Name="PART_ItemHost"
                    BackgroundColor="Red"
                    Direction="Column"
                    HorizontalOptions="End"
                    VerticalOptions="Fill"
                    Margin="0, 0, 0, 0"
                    WidthRequest="32"
                    BindableLayout.ItemsSource="{TemplateBinding Groups}">
            <BindableLayout.ItemTemplate>
                <DataTemplate>
                    <Label Text="{Binding Text}"
                           TextColor="#AAAAAA"
                           HorizontalTextAlignment="Center"
                           FontFamily="{StaticResource fonts/bold}"
                           BackgroundColor="Transparent"
                           InputTransparent="True"
                           FlexLayout.Grow="1"
                           FontSize="13"
                           HorizontalOptions="Start"
                           WidthRequest="24"
                           Margin="0">
                    </Label>
                </DataTemplate>
            </BindableLayout.ItemTemplate>
        </FlexLayout>
    </Grid>
</ControlTemplate>

The recognizer is added to the flexlayout during the control's OnApplyTemplate method. I have verified that the method is called, the layout is found, and the recognizer is added. However I do not get any PanUpdated events.

Does anyone have an idea?

Thank you in advance.


Viewing all articles
Browse latest Browse all 89864

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>