using System.Text.Json.Serialization; namespace Terminal.Gui; /// /// The is a that by default is centered and contains /// one or more s. It defaults to the Colors.ColorSchemes ["Dialog"] color scheme and has a /// 1 cell padding around the edges. /// /// /// To run the modally, create the , and pass it to /// . This will execute the dialog until /// it terminates via the (`Esc` by default), /// or when one of the views or buttons added to the dialog calls /// . /// public class Dialog : Window { /// The default for . /// This property can be set in a Theme. [SerializableConfigurationProperty (Scope = typeof (ThemeScope))] [JsonConverter (typeof (JsonStringEnumConverter))] public static Alignment DefaultButtonAlignment { get; set; } = Alignment.End; /// The default for . /// This property can be set in a Theme. [SerializableConfigurationProperty (Scope = typeof (ThemeScope))] [JsonConverter (typeof (JsonStringEnumConverter))] public static AlignmentModes DefaultButtonAlignmentModes { get; set; } = AlignmentModes.StartToEnd | AlignmentModes.AddSpaceBetweenItems; /// /// Defines the default minimum Dialog width, as a percentage of the container width. Can be configured via /// . /// [SerializableConfigurationProperty (Scope = typeof (ThemeScope))] public static int DefaultMinimumWidth { get; set; } = 25; /// /// Defines the default minimum Dialog height, as a percentage of the container width. Can be configured via /// . /// [SerializableConfigurationProperty (Scope = typeof (ThemeScope))] public static int DefaultMinimumHeight { get; set; } = 25; // TODO: Reenable once border/borderframe design is settled /// /// Defines the default border styling for . Can be configured via /// . /// //[SerializableConfigurationProperty (Scope = typeof (ThemeScope))] //public static Border DefaultBorder { get; set; } = new Border () { // LineStyle = LineStyle.Single, //}; private readonly List