Option Strict On
Option Explicit On

Imports System
Imports Nexamas.UI.Components

Namespace Nexamas.UI.Controls

    Partial Public NotInheritable Class MASTabControl


#Region "Lifecycle"

        Protected Overrides Sub OnDetached()
            MyBase.OnDetached()

            StopAnimation()
            StopSelectionIndicatorMotion()
            _hoverIndex = -1
            _pressedIndex = -1
            _hoverNav = MASTabNavButtonKind.None
            _pressedNav = MASTabNavButtonKind.None
        End Sub

#End Region



#Region "Dispose"

        Protected Overrides Sub Dispose(disposing As Boolean)
            If disposing Then
                Try
                    StopAnimation()
                    StopSelectionIndicatorMotion()
                Catch masCaughtException1 As Exception
                    Nexamas.UI.Diagnostics.MASExceptionSilencer.SwallowDisposeCleanup(masCaughtException1)
                End Try

                Try
                    _renderer.Dispose()
                Catch masCaughtException3 As Exception
                    Nexamas.UI.Diagnostics.MASExceptionSilencer.SwallowDisposeCleanup(masCaughtException3)
                End Try
            End If

            MyBase.Dispose(disposing)
        End Sub

#End Region



    End Class

End Namespace
