/// This class creates a border UI.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public class DefaultBorder : BaseHandle, IBorderInterface
+ public class DefaultBorder : BindableObject, IDisposable, IBorderInterface
{
#region Constant Fields
private static readonly string ResourcePath = FrameworkInformation.ResourcePath;
#region Fields
+ private bool disposed = false;
private Color backgroundColor;
private View borderView;
/// Creates a default border
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public DefaultBorder()
+ public DefaultBorder() : base()
{
BorderLineThickness = DefaultLineThickness;
TouchThickness = DefaultTouchThickness;
[EditorBrowsable(EditorBrowsableState.Never)]
protected void CloseBorderWindow()
{
+ Dispose();
BorderWindow.BorderDestroy();
}
return false;
}
- protected override void Dispose(DisposeTypes type)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void Dispose()
+ {
+ Dispose(true);
+ global::System.GC.SuppressFinalize(this);
+ }
+
+ protected virtual void Dispose(bool disposing)
{
if (disposed)
{
return;
}
- if (type == DisposeTypes.Explicit)
+ if (disposing)
{
ClearWindowGesture();
timer?.Dispose();
overlayTimer?.Dispose();
}
-
- //You must call base.Dispose(type) just before exit.
- base.Dispose(type);
+ disposed = true;
}
#endregion //Methods