ItemTap event is not invoked.

3 posts, 1 answers
  1. Hong
    Hong avatar
    15 posts
    Member since:
    Dec 2012

    Posted 21 Oct 2014 Link to this post

    Everything works fine, but RadDataBoundListBox_ItemTap is not invoked when an item is tapped.  Instead, RadDataBoundListBox_Tap is invoked.  Could anyone shed some light on this?

    <telerikPrimitives:RadExpanderControl.ExpandableContentTemplate>
        <DataTemplate>
            <Grid Margin="0,0,0,24">
                <telerikPrimitives:RadDataBoundListBox ItemsSource="{Binding Items}" IsHitTestVisible="True" ItemTap="RadDataBoundListBox_ItemTap" Tap="RadDataBoundListBox_Tap">
                    <telerikPrimitives:RadDataBoundListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid Margin="37,6">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition/>
                                </Grid.ColumnDefinitions>
                                <!--<Image Width="87" Height="87" Source="{Binding ImageThumbnailSource}"/>-->
                                <StackPanel Grid.Column="1">
                                    <Button Margin="12,-9,12,0" Grid.Column="1" Content="{Binding Title}" Tag="{Binding Information}" FontFamily="Segoe WP SemiLight" FontSize="{StaticResource PhoneFontSizeLarge}" Foreground="{StaticResource PhoneForegroundBrush}" Click="Button_Click"/>
                                    <!--<TextBlock Margin="12,0" Grid.Column="1" Text="{Binding Information}" TextWrapping="Wrap" Foreground="{StaticResource PhoneForegroundBrush}"/>-->
                                </StackPanel>
                            </Grid>
                        </DataTemplate>
                    </telerikPrimitives:RadDataBoundListBox.ItemTemplate>
                </telerikPrimitives:RadDataBoundListBox>
            </Grid>
        </DataTemplate>
    </telerikPrimitives:RadExpanderControl.ExpandableContentTemplate>

  2. Answer
    Vladislav
    Admin
    Vladislav avatar
    276 posts

    Posted 24 Oct 2014 Link to this post

    Hi Hong,

    The RadDataBoundListBox control doesn't fire it's items "Tap events" if some control inside an Item is capturing "Manipulation events". This is done in order to allow using of complex controls inside RadDataBoundLitBoxItem(s). In your case, the Button captures the "ManipulationStarted event" and this prevents the firing of the "RadDataBoundListBox_ItemTap" event.
    I hope that this clarifies the described behavior.

    Please don't hesitate to ask if you have any additional questions.

    Regards,
    Vladislav
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Hong
    Hong avatar
    15 posts
    Member since:
    Dec 2012

    Posted 29 Oct 2014 in reply to Vladislav Link to this post

    Thank you for the clarification, Vladislav.
Back to Top