Exemplo n.º 1
0
        static void TreeView_ProtectActivateMultipleSelection(
            object sender, KeyPressEventArgs args)
        {
            TreeView treeView = sender as TreeView;

            if (Keyboard.IsEnterPressed(args.Event) ||
                Keyboard.IsSpacePressed(args.Event))
            {
                treeView.ActivateRow(null, null);
                args.RetVal = true;
                return;
            }

            args.RetVal = false;
        }
Exemplo n.º 2
0
 public void Activate(TreePath path, bool align, bool reselect)
 {
     Select(path, align, reselect);
     tree.ActivateRow(path, null);
 }