Option Strict On
Option Explicit On

Imports System
Imports System.Collections.Specialized
Imports System.Diagnostics
Imports System.IO
Imports System.Windows.Forms
Imports Nexamas.UI.Controls
Imports Nexamas.UI.Composition
Imports Nexamas.UI.FileSystem
Imports Nexamas.UI.General
Imports Nexamas.UI.Rendering
Imports Nexamas.UI.Theming
Imports Nexamas.UI.Values
Imports Nexamas.UI.Layout
Imports SkiaSharp

Namespace Nexamas.UI.Components


    Partial Public NotInheritable Class MASFilePickerControl
#Region "PanelShell hosted content contract"

        Private ReadOnly Property HostedPanelShellResult As MASPanelShellResult Implements IMASPanelShellHostedContent.LastPanelShellResult
            Get
                Return _lastShellResult
            End Get
        End Property


        Private ReadOnly Property HostedPanelShellDragEnabled As Boolean Implements IMASPanelShellHostedContent.PanelShellDragEnabled
            Get
                Return True
            End Get
        End Property


        Private ReadOnly Property HostedPanelShellCloseEnabled As Boolean Implements IMASPanelShellHostedContent.PanelShellCloseEnabled
            Get
                Return True
            End Get
        End Property


        Private Sub SetHostedPanelShellCloseButtonInteraction(isHover As Boolean,
                                                                 isPressed As Boolean) _
            Implements IMASPanelShellHostedContent.SetPanelShellCloseButtonInteraction

            If _disposedLocal OrElse Not Me.Enabled Then
                isHover = False
                isPressed = False
            End If

            If _panelShellCloseHover = isHover AndAlso _panelShellClosePressed = isPressed Then Return

            _panelShellCloseHover = isHover
            _panelShellClosePressed = isPressed
            SafeInvalidate()
        End Sub


        Private Function RequestHostedPanelShellClose() As Boolean Implements IMASPanelShellHostedContent.RequestPanelShellClose
            _panelShellCloseHover = False
            _panelShellClosePressed = False
            CancelSelection()
            Return True
        End Function



#End Region

    End Class

End Namespace
