Siddle Mathew

Siddle Mathew

  • NA
  • 75
  • 1k

Selection chaned event does not working with touch scroll?

Apr 16 2016 4:57 AM
Touch Scrolling is working when check my app by window Simulator on the OS 2010.  
Selection event of Telerik TileList control does not firing with touch screen. I want to scrolling tile list by touch screen and if user click on tiles then will be fire selection changed event  but not firing why?
  1. <ScrollViewer VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto"  PanningMode="Both"  ManipulationBoundaryFeedback="ScrollViewerCanvas_ManipulationBoundaryFeedback">  
  2.                                    <telerik:RadTileList Grid.Column="1" Grid.Row="1" x:Name="horizontalListBox"  ItemsPanel="{StaticResource itemsPanelTemplate}"  
  3.                     ItemsSource="{Binding HomeModel.TechnicianFieldScheuleCollection }">  
  4.   
  5.   
  6.                                    <telerik:RadTileList.ItemContainerStyle>  
  7.                                            <Style>  
  8.                                                  
  9.                                                <Setter Property="telerik:Tile.Background" Value="Transparent" />  
  10.                                                   
  11.                                                  
  12.                                            </Style>  
  13.   
  14.                                            <!--<Style TargetType="telerik:Tile" BasedOn="{StaticResource {x:Type telerik:Tile}}">  
  15.                                                <Setter Property="Background" Value="Tomato"/>  
  16.                                                  
  17.                                                  
  18.                                                <Setter Property="flowConfiguration:TileAttachedProperties.IsTyleTypeBound" Value="True"/>  
  19.                                                these events wil be handled in .xaml.cs file  
  20.                                                <EventSetter Event="TouchDown" Handler="TouchDown_OnHandler"/>  
  21.                                                <EventSetter Event="MouseDown" Handler="MouseDown_OnHandler"/>  
  22.                                                <Setter Property="Template">  
  23.                                                    <Setter.Value>  
  24.                                                        <ControlTemplate>  
  25.                                                            <Grid x:Name="TileRootPanel" Background="{TemplateBinding Background}" Margin="10"  
  26.                                      HorizontalAlignment="Stretch"   
  27.                                      VerticalAlignment="Stretch">  
  28.                                                                <Grid x:Name="ContentVisual" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">  
  29.                                                                    <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  
  30.                                            Content="{Binding   
  31.                                            RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:Tile}},   
  32.                                            Path=Content, UpdateSourceTrigger=PropertyChanged}"  
  33.                                            ContentTemplateSelector="{StaticResource TileContentTemplateSelectorKey}"/>  
  34.                                                                </Grid>  
  35.                                                                <Border x:Name="SelectedVisual" Visibility="Collapsed" BorderThickness="1" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">  
  36.                                                                    <Grid Margin="0" x:Name="SelectedSymbol" Background="Blue"  
  37.                                                      HorizontalAlignment="Right"   
  38.                                                      VerticalAlignment="Bottom" Width="20" Height="20">  
  39.                                                                        <TextBlock Text="!" FontWeight="Bold" Foreground="Red" HorizontalAlignment="Center" VerticalAlignment="Center"/>  
  40.                                                                    </Grid>  
  41.                                                                </Border>  
  42.                                                                <Border x:Name="MouseOverVisual" Margin="0"   
  43.                                            Visibility="Collapsed" BorderThickness="1"   
  44.                                            HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>  
  45.                                                            </Grid>  
  46.                                                            <ControlTemplate.Triggers>  
  47.                                                                <Trigger Property="telerik:Tile.IsMouseOver" Value="True">  
  48.                                                                    <Setter Property="Border.BorderBrush" TargetName="MouseOverVisual" Value="GreenYellow"/>  
  49.                                                                    <Setter Property="Border.Visibility" TargetName="MouseOverVisual" Value="Visible"/>  
  50.                                                                    <Setter Property="Border.BorderThickness" TargetName="MouseOverVisual" Value="1.5"/>  
  51.                                                                </Trigger>  
  52.                                                                <Trigger Property="telerik:Tile.IsMouseOver" Value="False">  
  53.                                                                    <Setter Property="Border.BorderBrush" TargetName="MouseOverVisual" Value="Transparent"/>  
  54.                                                                    <Setter Property="Border.Visibility" TargetName="MouseOverVisual" Value="Collapsed"/>  
  55.                                                                </Trigger>  
  56.                                                                <Trigger Property="telerik:Tile.IsSelected" Value="True">  
  57.                                                                    <Setter Property="Border.BorderBrush" TargetName="SelectedVisual" Value="Blue"/>  
  58.                                                                    <Setter Property="Border.BorderThickness" TargetName="SelectedVisual" Value="2.5"/>  
  59.                                                                    <Setter Property="Grid.Visibility" TargetName="SelectedVisual" Value="Visible"/>  
  60.                                                                </Trigger>  
  61.                                                                <Trigger Property="telerik:Tile.IsSelected" Value="False">  
  62.                                                                    <Setter Property="Border.BorderBrush" TargetName="SelectedVisual" Value="Transparent"/>  
  63.                                                                    <Setter Property="Grid.Visibility" TargetName="SelectedVisual" Value="Collapsed"/>  
  64.                                                                </Trigger>  
  65.                                                            </ControlTemplate.Triggers>  
  66.                                                        </ControlTemplate>  
  67.                                                    </Setter.Value>  
  68.                                                </Setter>  
  69.                                            </Style>-->  
  70.                                        </telerik:RadTileList.ItemContainerStyle>  
  71.                                   
  72.                                    
  73.                                    <ie:Interaction.Triggers>  
  74.                                        <ie:EventTrigger EventName="SelectionChanged">  
  75.                                            <ie:InvokeCommandAction Command="{Binding homeTileListSelectedItemChangedCommand}" >  
  76.                                                <ie:InvokeCommandAction.CommandParameter>  
  77.                                                    <MultiBinding>  
  78.                                                        <MultiBinding.Converter>  
  79.                                                            <app:TechnicianConverterHome></app:TechnicianConverterHome>  
  80.                                                        </MultiBinding.Converter>  
  81.                                                        <Binding ElementName="horizontalListBox" />  
  82.                                                        <Binding ElementName="HomeUserControl" />  
  83.                                                    </MultiBinding>  
  84.                                                </ie:InvokeCommandAction.CommandParameter>  
  85.                                            </ie:InvokeCommandAction>  
  86.                                        </ie:EventTrigger>  
  87.                                    </ie:Interaction.Triggers>  
  88.   
  89.   
  90.                                </telerik:RadTileList>  
  91.   
  92.                                   </ScrollViewer> 
 and in code behind :
  1. private void ScrollViewerCanvas_ManipulationBoundaryFeedback(object sender, ManipulationBoundaryFeedbackEventArgs e)  
  2.         {  
  3.             e.Handled = true;  
  4.         }