Пример #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;
        }
Пример #2
0
 public void Activate(TreePath path, bool align, bool reselect)
 {
     Select(path, align, reselect);
     tree.ActivateRow(path, null);
 }