|
@@ -242,6 +242,11 @@ public partial class View : Responder, ISupportInitializeNotification
|
|
|
|
|
|
Margin?.Dispose ();
|
|
|
Margin = null;
|
|
|
+
|
|
|
+ if (Border?.CloseButton is { })
|
|
|
+ {
|
|
|
+ Border?.CloseButton.Dispose ();
|
|
|
+ }
|
|
|
Border?.Dispose ();
|
|
|
Border = null;
|
|
|
Padding?.Dispose ();
|
|
@@ -460,7 +465,23 @@ public partial class View : Responder, ISupportInitializeNotification
|
|
|
_oldCanFocus = CanFocus;
|
|
|
_oldTabIndex = _tabIndex;
|
|
|
Margin?.BeginInit ();
|
|
|
+
|
|
|
Border?.BeginInit ();
|
|
|
+ if (Border is { })
|
|
|
+ {
|
|
|
+ Border.CloseButton = new Button ()
|
|
|
+ {
|
|
|
+ Text = "X",
|
|
|
+ X = Pos.AnchorEnd (1),
|
|
|
+ Y = 0,
|
|
|
+ CanFocus = true,
|
|
|
+ //NoDecorations = true,
|
|
|
+ Visible = true,
|
|
|
+ };
|
|
|
+ Border.Add (Border.CloseButton);
|
|
|
+ Border.CloseButton.Accept += (s, e) => { Border.Parent.InvokeCommand (Command.Accept); };
|
|
|
+ }
|
|
|
+
|
|
|
Padding?.BeginInit ();
|
|
|
|
|
|
if (_subviews?.Count > 0)
|