IControl.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright (c) The Perspex Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using System;
  4. using Perspex.Controls.Templates;
  5. using Perspex.Input;
  6. using Perspex.Layout;
  7. using Perspex.Styling;
  8. namespace Perspex.Controls
  9. {
  10. /// <summary>
  11. /// Interface for Perspex controls.
  12. /// </summary>
  13. public interface IControl : IVisual, ILogical, ILayoutable, IInputElement, INamed, IStyleable, IStyleHost
  14. {
  15. /// <summary>
  16. /// Raised when the control is attached to a rooted logical tree.
  17. /// </summary>
  18. event EventHandler<LogicalTreeAttachmentEventArgs> AttachedToLogicalTree;
  19. /// <summary>
  20. /// Raised when the control is detached from a rooted logical tree.
  21. /// </summary>
  22. event EventHandler<LogicalTreeAttachmentEventArgs> DetachedFromLogicalTree;
  23. /// <summary>
  24. /// Gets or sets the control's styling classes.
  25. /// </summary>
  26. new Classes Classes { get; set; }
  27. /// <summary>
  28. /// Gets or sets the control's data context.
  29. /// </summary>
  30. object DataContext { get; set; }
  31. /// <summary>
  32. /// Gets the data templates for the control.
  33. /// </summary>
  34. DataTemplates DataTemplates { get; }
  35. /// <summary>
  36. /// Gets the control's logical parent.
  37. /// </summary>
  38. IControl Parent { get; }
  39. }
  40. }