Files
Terminal.Gui/Terminal.Gui/View/IDesignable.cs
2024-06-28 22:27:50 -07:00

24 lines
1.1 KiB
C#

namespace Terminal.Gui;
/// <summary>
/// Interface declaring common functionality useful for designer implementations.
/// </summary>
public interface IDesignable
{
/// <summary>
/// Causes the View to enable design-time mode. This typically means that the view will load demo data and
/// be configured to allow for design-time manipulation.
/// </summary>
/// <param name="context">Optional arbitrary, View-specific, context.</param>
/// <typeparam name="TContext">A non-null type for <paramref name="context"/>.</typeparam>
/// <returns><see langword="true"/> if the view successfully loaded demo data.</returns>
public bool EnableForDesign<TContext> (in TContext context) where TContext : notnull => EnableForDesign ();
/// <summary>
/// Causes the View to enable design-time mode. This typically means that the view will load demo data and
/// be configured to allow for design-time manipulation.
/// </summary>
/// <returns><see langword="true"/> if the view successfully loaded demo data.</returns>
public bool EnableForDesign () => false;
}