Imports System.ComponentModel
Namespace EgtCAM5
Public Class AboutBoxViewModel
Implements INotifyPropertyChanged
'Inherits ViewModelBase
Private m_AboutBoxVisibility As Visibility
Public Property AboutBoxVisibility As Visibility
Get
Return m_AboutBoxVisibility
End Get
Set(value As Visibility)
If value <> m_AboutBoxVisibility Then
m_AboutBoxVisibility = value
NotifyPropertyChanged("AboutBoxVisibility")
End If
End Set
End Property
' Definizione comandi
Private m_cmdClose As ICommand
#Region "COMMANDS"
#Region "CloseCommand"
'''
''' Returns a command that do Point.
'''
Public ReadOnly Property CloseCommand As ICommand
Get
If m_cmdClose Is Nothing Then
m_cmdClose = New Command(AddressOf Close, AddressOf CanClose)
End If
Return m_cmdClose
End Get
End Property
'''
''' Execute the Point. This method is invoked by the PointCommand.
'''
Public Sub Close(ByVal param As Object)
AboutBoxVisibility = Visibility.Hidden
End Sub
'''
''' Returns always true.
'''
Private Function CanClose(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CloseCommand
#End Region ' Commands
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
Public Sub NotifyPropertyChanged(propName As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
End Class
End Namespace