Beispiel #1
0
        protected virtual void OnDropCheck(object sender, RoutedEventArgs e)
        {
            DropCheckEventArgs Args = (DropCheckEventArgs)e;
            IExtendedTreeNode  DropDestinationItem = Args.DropDestinationItem as IExtendedTreeNode;

            if (DropDestinationItem != null && DropDestinationItem.Children.Count == 0 && TreeViewSettingsWindow.AreLeavesSealed)
            {
                Args.Deny();
            }
        }
        protected virtual void OnDropCheck(object sender, RoutedEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException(nameof(e));
            }

            DropCheckEventArgs Args = (DropCheckEventArgs)e;
            IExtendedTreeNode  DropDestinationItem = (IExtendedTreeNode)Args.DropDestinationItem;

            if (DropDestinationItem != null && ((ICollection <IExtendedTreeNode>)DropDestinationItem.Children).Count == 0 && TreeViewSettingsWindow.AreLeavesSealed)
            {
                Args.Deny();
            }
        }