Пример #1
0
        public static SecureObjectDragDrop GetAttachedBehavior(RadTreeListView gridview)
        {
            if (!_instances.ContainsKey(gridview))
            {
                _instances[gridview] = new SecureObjectDragDrop
                {
                    AssociatedTreeListView = gridview
                }
            }
            ;

            return(_instances[gridview]);
        }
Пример #2
0
        public static void SetIsEnabled(DependencyObject obj, bool isEnabled)
        {
            SecureObjectDragDrop behavior = GetAttachedBehavior(obj as RadTreeListView);

            behavior.AssociatedTreeListView = obj as RadTreeListView;

            if (isEnabled)
            {
                behavior.Initialize();
            }
            else
            {
                behavior.CleanUp();
            }

            obj.SetValue(IsEnabledProperty, isEnabled);
        }