Public Class ImportLoadingWndV Private WithEvents m_ImportLoadingWndVM As ImportLoadingWndVM Sub New(Owner As Window, ImportLoadingWndVM As ImportLoadingWndVM) MyBase.New(Owner) ' This call is required by the designer. InitializeComponent() Me.DataContext = ImportLoadingWndVM ' Assegno al riferimento locale al VM il VM preso dal DataContext m_ImportLoadingWndVM = ImportLoadingWndVM End Sub End Class