Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2589
Disable doubleclick behaviour
posted

I need to disable doubleclick behaviour and make treeview open only by clicking an indicator. Is there a way to do that?

And yet. Is there a way to subscribe to doubleclick event? I don't see corresponding event in tree.

Thank you.

Parents
No Data
Reply
  • 4666
    posted

    Hi dprosko!

    It is possible to create own class, that inherits XamWebTreeItem and override OnMouseLeftButtonUp method:

        public class CustomTreeItem : XamWebTreeItem
        {
            protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
            {
                this.IsExpanded = !this.IsExpanded;
            }

    and use it instead XamWebTreeItem in XamWebTree:

            <igTree:XamWebTree x:Name="xTree">
                <local:CustomTreeItem x:Name="TestItem1" Header="Test Item 1" MouseLeftButtonDown="TestItem_MouseLeftButtonDown" >
                    <igTree:XamWebTreeItem x:Name="SubItem1" Header="SubItem 1" />
                </local:CustomTreeItem>
                <igTree:XamWebTreeItem x:Name="TestItem2" Header="Test Item 1" />
            </igTree:XamWebTree>

    I hope that can help :)

    Best Regards!

     

    Mihail

     


        }

     

Children