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; } = 80; /// /// 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; } = 80; /// /// Gets or sets whether all s are shown with a shadow effect by default. /// [SerializableConfigurationProperty (Scope = typeof (ThemeScope))] [JsonConverter (typeof (JsonStringEnumConverter))] public new static ShadowStyle DefaultShadow { get; set; } = ShadowStyle.None; /// /// Defines the default border styling for . Can be configured via /// . /// [SerializableConfigurationProperty (Scope = typeof (ThemeScope))] [JsonConverter (typeof (JsonStringEnumConverter))] public new static LineStyle DefaultBorderStyle { get; set; } = LineStyle.Single; private readonly List