DropTargetBase.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*************************************************************************************
  2. Extended WPF Toolkit
  3. Copyright (C) 2007-2013 Xceed Software Inc.
  4. This program is provided to you under the terms of the Microsoft Public
  5. License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
  6. For more features, controls, and fast professional support,
  7. pick up the Plus Edition at http://xceed.com/wpf_toolkit
  8. Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
  9. ***********************************************************************************/
  10. using System;
  11. using System.Collections.Generic;
  12. using System.Linq;
  13. using System.Text;
  14. using System.Windows;
  15. namespace Xceed.Wpf.AvalonDock.Controls
  16. {
  17. abstract class DropTargetBase : DependencyObject
  18. {
  19. #region IsDraggingOver
  20. /// <summary>
  21. /// IsDraggingOver Attached Dependency Property
  22. /// </summary>
  23. public static readonly DependencyProperty IsDraggingOverProperty =
  24. DependencyProperty.RegisterAttached("IsDraggingOver", typeof(bool), typeof(DropTargetBase),
  25. new FrameworkPropertyMetadata((bool)false));
  26. /// <summary>
  27. /// Gets the IsDraggingOver property. This dependency property
  28. /// indicates if user is dragging a window over the target element.
  29. /// </summary>
  30. public static bool GetIsDraggingOver(DependencyObject d)
  31. {
  32. return (bool)d.GetValue(IsDraggingOverProperty);
  33. }
  34. /// <summary>
  35. /// Sets the IsDraggingOver property. This dependency property
  36. /// indicates if user is dragging away a window from the target element.
  37. /// </summary>
  38. public static void SetIsDraggingOver(DependencyObject d, bool value)
  39. {
  40. d.SetValue(IsDraggingOverProperty, value);
  41. }
  42. #endregion
  43. }
  44. }