OnDragQuery Not triggered by Touch

3 posts, 0 answers
  1. Pat Tormey
    Pat Tormey avatar
    20 posts
    Member since:
    Feb 2010

    Posted 05 Apr 2011 Link to this post

    Ok So here's the deal.
     VS2010 WPF Telerik 2011 Q1

    The sample code runs just fine for Drag & Drop with either mouse of touch.. ViewSonic MultiTouch Monitor and HP Slate 500.

    BUT my own code works with with the mouse and not Touch.. the OnDragQuery event never fires for Touch..

    Any ideas??

    Thanks
    Pat NH USA..

    <UserControl
        xmlns:CaptureScreens_Classes="clr-namespace:CaptureScreens.Classes"
        xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
      
        x:Name="Main"
        mc:Ignorable="d"
        x:Class="CaptureScreens.MainScreen" >
        <UserControl.Resources>
            <DataTemplate
                x:Key="DragTemplate">
                <Image
                    Source="{Binding IconPath}"
                    Stretch="None"
                    VerticalAlignment="Top" />
            </DataTemplate>
            <Style
                TargetType="{x:Type ListBoxItem}"
                x:Key="draggableItemStyle">
                <Setter
                    Property="HorizontalContentAlignment"
                    Value="Stretch" />
                <Setter
                    Property="telerikDragDrop:RadDragAndDropManager.AllowDrag"
                    Value="True" />
            </Style>
       
        </UserControl.Resources>
        <UserControl.DataContext>
            <CaptureScreens_Classes:QManagement
                x:Name="QManagementInstance" />
        </UserControl.DataContext>
        <Canvas
            x:Name="LayoutRoot"
            Height="600"
            Margin="0,5,0,0"
            Width="1024" Background="White">
            <ListBox
                x:Name="lstRxToday"
                ItemsSource="{Binding RxToday, Mode=TwoWay}"
                telerik:RadDragAndDropManager.AllowDrag="True"
                telerik:RadDragAndDropManager.AllowDrop="True"
                ItemContainerStyle="{StaticResource draggableItemStyle}"
                VerticalAlignment="Top" Canvas.Left="2" Canvas.Top="2" Width="196" />
            <ListBox
                x:Name="lstPurchased"
                ItemsSource="{Binding PurchasedRx, Mode=TwoWay}"
                telerik:RadDragAndDropManager.AllowDrag="True"
                telerik:RadDragAndDropManager.AllowDrop="True"
                ItemContainerStyle="{StaticResource draggableItemStyle}"
                Height="442" Canvas.Left="240" Canvas.Top="8" Width="194"/>
        </Canvas>
    </UserControl>

  2. Brian Crosby
    Brian Crosby avatar
    6 posts
    Member since:
    Jan 2006

    Posted 05 Apr 2011 Link to this post

    I've been fighting this for the last few days. This appears to be a bug. For me the solution was to apply a theme. I
    added telerik:StyleManager.Theme="Office_Black" to the ListBox. Then touch started to work. Good luck...



    - Brian

  3. UI for WPF is Visual Studio 2017 Ready
  4. Pat Tormey
    Pat Tormey avatar
    20 posts
    Member since:
    Feb 2010

    Posted 06 Apr 2011 Link to this post

    WOW.. Apply a theme to get Drag and Drop Touch working?

    It Worked! I own you a beer.. or several..
    Alright that might be hard to do.. So I'll send $50 to Japan Relief

    How did you ever figure that out?? I would never have guessed.....

    THANKS!
    Pat NH USA
Back to Top