This is a migrated thread and some comments may be shown as answers.

Touch and move above RadTreeViewItem crash application

6 Answers 73 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Jiri
Top achievements
Rank 1
Jiri asked on 26 Sep 2013, 07:48 AM
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.

6 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 30 Sep 2013, 07:31 AM
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 >>
0
Jiri
Top achievements
Rank 1
answered on 30 Sep 2013, 10:23 AM
Hi, thank you for your answer, here is my solution http://s000.tinyupload.com/?file_id=26823946829249817952
0
Stefan
Telerik team
answered on 02 Oct 2013, 11:17 AM
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 >>
0
Jiri
Top achievements
Rank 1
answered on 02 Oct 2013, 11:43 AM
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
0
Stefan
Telerik team
answered on 04 Oct 2013, 09:17 AM
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 >>
0
Jiri
Top achievements
Rank 1
answered on 07 Oct 2013, 02:16 PM
ohhhh, I got it wrong first time :D :D thank you very much, now it works perfectly :)
Tags
TreeView
Asked by
Jiri
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Jiri
Top achievements
Rank 1
Share this question
or