RadTreeViewItem MouseDoubleClick Event Using MVVM

7 posts, 0 answers
  1. alino
    alino avatar
    22 posts
    Member since:
    Sep 2010

    Posted 20 Sep 2010 Link to this post

    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 

     
  2. Viktor Tsvetkov
    Admin
    Viktor Tsvetkov avatar
    382 posts

    Posted 23 Sep 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. alino
    alino avatar
    22 posts
    Member since:
    Sep 2010

    Posted 07 Oct 2010 Link to this post

    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
  5. Amir
    Amir avatar
    2 posts
    Member since:
    Apr 2012

    Posted 02 May 2012 Link to this post

    Can you provid a sample as I am having similar problem.

    Thanks in advance:)
  6. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 03 May 2012 Link to this post

    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 >>

  7. Amir
    Amir avatar
    2 posts
    Member since:
    Apr 2012

    Posted 03 May 2012 Link to this post

    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
  8. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 04 May 2012 Link to this post

    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 >>

Back to Top
UI for WPF is Visual Studio 2017 Ready