|
1 |
| -namespace Terminal.Gui; |
| 1 | +#nullable enable |
| 2 | +namespace Terminal.Gui; |
2 | 3 |
|
3 | 4 | /// <summary>
|
4 |
| -/// A <see cref="Toplevel"/> <see cref="View"/> with <see cref="View.BorderStyle"/> set to |
5 |
| -/// <see cref="LineStyle.Single"/>. Provides a container for other views. |
| 5 | +/// An overlapped container for other views with a border and optional title. |
6 | 6 | /// </summary>
|
7 | 7 | /// <remarks>
|
8 | 8 | /// <para>
|
9 |
| -/// If any subview is a button and the <see cref="Button.IsDefault"/> property is set to true, the Enter key will |
10 |
| -/// invoke the <see cref="Command.Accept"/> command on that subview. |
| 9 | +/// Window has <see cref="View.BorderStyle"/> set to <see cref="LineStyle.Single"/>, <see cref="View.Arrangement"/> |
| 10 | +/// set to <see cref="ViewArrangement.Overlapped"/>, and |
| 11 | +/// uses the Base <see cref="Colors.ColorSchemes"/> color scheme by default. |
| 12 | +/// </para> |
| 13 | +/// <para> |
| 14 | +/// To enable Window to be sized and moved by the user, adjust <see cref="View.Arrangement"/>. |
11 | 15 | /// </para>
|
12 | 16 | /// </remarks>
|
| 17 | +/// <seealso cref="FrameView"/> |
13 | 18 | public class Window : Toplevel
|
14 | 19 | {
|
15 |
| - |
16 |
| - /// <summary> |
17 |
| - /// Gets or sets whether all <see cref="Window"/>s are shown with a shadow effect by default. |
18 |
| - /// </summary> |
19 |
| - [SerializableConfigurationProperty (Scope = typeof (ThemeScope))] |
20 |
| - public static ShadowStyle DefaultShadow { get; set; } = ShadowStyle.None; |
21 |
| - |
22 |
| - |
23 | 20 | /// <summary>
|
24 | 21 | /// Initializes a new instance of the <see cref="Window"/> class.
|
25 | 22 | /// </summary>
|
26 | 23 | public Window ()
|
27 | 24 | {
|
28 | 25 | CanFocus = true;
|
29 | 26 | TabStop = TabBehavior.TabGroup;
|
30 |
| - Arrangement = ViewArrangement.Movable | ViewArrangement.Overlapped | ViewArrangement.Resizable; |
31 |
| - ColorScheme = Colors.ColorSchemes ["Base"]; // TODO: make this a theme property |
| 27 | + Arrangement = ViewArrangement.Overlapped; |
| 28 | + base.ColorScheme = Colors.ColorSchemes ["Base"]; // TODO: make this a theme property |
32 | 29 | BorderStyle = DefaultBorderStyle;
|
33 |
| - ShadowStyle = DefaultShadow; |
| 30 | + base.ShadowStyle = DefaultShadow; |
34 | 31 | }
|
35 | 32 |
|
| 33 | + /// <summary> |
| 34 | + /// Gets or sets whether all <see cref="Window"/>s are shown with a shadow effect by default. |
| 35 | + /// </summary> |
| 36 | + [SerializableConfigurationProperty (Scope = typeof (ThemeScope))] |
| 37 | + public static ShadowStyle DefaultShadow { get; set; } = ShadowStyle.None; |
| 38 | + |
36 | 39 | // TODO: enable this
|
37 | 40 | ///// <summary>
|
38 | 41 | ///// The default <see cref="LineStyle"/> for <see cref="Window"/>'s border. The default is <see cref="LineStyle.Single"/>.
|
|
0 commit comments