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

RadTreeViewItem MouseDoubleClick Event Using MVVM

6 Answers 205 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
alino
Top achievements
Rank 1
alino asked on 20 Sep 2010, 07:32 PM
Hi,

I have a problem how to declare the MouseDoubleClick event using XAML in The MVVM pattern. For the the event associated to the RadTreeView I do not have problem. I do like this in my XAML:
<telerik:RadTreeView .......>
  <i:Interaction.Triggers>
   <i:EventTrigger EventName="LoadOnDemand">
    <vm:InvokeDelegateCommandAction Command="{StaticResource loadOnDemandCommand}" 
    CommandParameter="{Binding RelativeSource={RelativeSource Self, Path=InvokeParameter}"/>
   </i:EventTrigger>
  <i:Iteraction.Triggers>
</telerik:RadTreeView>

In the code snippet, I have created a command named  loadOnDemandCommand which is associated to the LoadOnDemandMethod in the viewModel when the LoadOnDemand event fires.

How can I do in XAML to declare a DoubleClick event which fires after double clicking on the RadTreeViewItem.

Thanks for your precious Help.

Alino 

 

6 Answers, 1 is accepted

Sort by
0
Viktor Tsvetkov
Telerik team
answered on 23 Sep 2010, 02:07 PM
Hello alino,

Currently there is no MouseDoubleClick event, but if you need one you can inherit from RadTreeView and make one, or just add ClassHandler for MouseLeftButtonDown and manage the double click logic.

Best wishes,
Viktor Tsvetkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
alino
Top achievements
Rank 1
answered on 07 Oct 2010, 02:36 PM
Hi Tsvetkov,

Thanks so much for your advices, now i use the MouseLeftButtonDown to manage the double click event and it s working.

Best regards,

Alino
0
Amir
Top achievements
Rank 1
answered on 02 May 2012, 09:27 AM
Can you provid a sample as I am having similar problem.

Thanks in advance:)
0
Petar Mladenov
Telerik team
answered on 03 May 2012, 06:59 AM
Hello Amir, 
This is an old post and the RadTreeView has introduced new events since then. You use:
  • RadTreeView.ItemClick
  • RadTreeView.ItemDoubleClick
  • RadTreeViewItem.Click
  • RadTreeViewItem.DoubleClick
You can find their description here.

Kind regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Amir
Top achievements
Rank 1
answered on 03 May 2012, 07:10 AM
Thanks for your reply, We are still on the trial period of your component and still plenty of things needs to be taken care.
One of them is that we need to abe able to double click on the row using MVVM. I appreciate if you could populate a sample.

Thanks in advance
0
Petar Mladenov
Telerik team
answered on 04 May 2012, 06:19 AM
Hi Amir,

 You can always use the EventToCommand pattern from MVVMLight. You can find assemblies, code and samples here.

All the best,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TreeView
Asked by
alino
Top achievements
Rank 1
Answers by
Viktor Tsvetkov
Telerik team
alino
Top achievements
Rank 1
Amir
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or