Touch and move above RadTreeViewItem crash application

7 posts, 0 answers
  1. Jiri
    Jiri avatar
    23 posts
    Member since:
    Aug 2013

    Posted 26 Sep 2013 Link to this post

    Hi I have notebook with touch sreen (win 8) and when I touch and move with my finger above RadTreeViewItem (or RadTreeView) my application crash. I do not have implemented DragAndDrop.
  2. Stefan
    Admin
    Stefan avatar
    89 posts

    Posted 30 Sep 2013 Link to this post

    Hello Jiri,

    Thanks for your report. I tried to reproduce the described issue with a sample project including only a RadTreeView with few items, but the application didn't crash.

    In order to provide you further assistance may I ask you to send us a sample project reproducing the problem?
     
    Regards,
    Stefan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jiri
    Jiri avatar
    23 posts
    Member since:
    Aug 2013

    Posted 30 Sep 2013 Link to this post

    Hi, thank you for your answer, here is my solution http://s000.tinyupload.com/?file_id=26823946829249817952
  5. Stefan
    Admin
    Stefan avatar
    89 posts

    Posted 02 Oct 2013 Link to this post

    Hi Jiri,

    Thanks for the project. It was really helpful in resolving the issue.

    I manged to reproduce the exception, which is caused by the style of the ScrollViewer you use. You need to set a x:Name of the ScrollViewer in your style (x:Name="ScrollViewer") and the exception will not be thrown again.

    Regards,
    Stefan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Jiri
    Jiri avatar
    23 posts
    Member since:
    Aug 2013

    Posted 02 Oct 2013 Link to this post

    Hi,

    thank you for your answer. I deleted the template for ScrolViewer (Template="{DynamicResource FavNavScrollViewer}"), but the erorr is still there. Everythime I touch a RadTreeView I get TouchHandlersController_WPF.cs not found
  7. Stefan
    Admin
    Stefan avatar
    89 posts

    Posted 04 Oct 2013 Link to this post

    Hello Jiri,

    I didn't mean that you have to delete your ScrollViewer's style. You just have to add a x:Name=ScrollViewer in it. Which means that the ScrollViewer's style should looks like this:

    <ScrollViewer Template="{DynamicResource FavNavScrollViewer}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
              IsTabStop="False" Margin="0" Padding="{TemplateBinding Padding}"
              VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
             CanContentScroll="True"
             x:Name="ScrollViewer">
             <ItemsPresenter/>
    </ScrollViewer>

    The x:Name is needed because in the code when you move your finger the RadTreeView search the ScrollViewer by his x:Name and if it is not set the ScrollViewer is null and a NullReferenceException is thrown.

    Regards,
    Stefan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  8. Jiri
    Jiri avatar
    23 posts
    Member since:
    Aug 2013

    Posted 07 Oct 2013 Link to this post

    ohhhh, I got it wrong first time :D :D thank you very much, now it works perfectly :)
Back to Top
UI for WPF is Visual Studio 2017 Ready