Public Class GeneralParametersWnd #Region "FIELDS & PROPERTIES" Private WithEvents m_GeneralParametersWndVM As GeneralParametersWndVM #End Region ' Fields & Properties #Region "CONSTRUCTOR" Sub New(Owner As Window, GeneralParametersWndVM As GeneralParametersWndVM) ' This call is required by the designer. InitializeComponent() Me.DataContext = GeneralParametersWndVM ' Assegno al riferimento locale al VM il VM preso dal DataContext m_GeneralParametersWndVM = GeneralParametersWndVM End Sub #End Region ' Constructor #Region "EVENTS" Private Sub CloseWindow(bDialogResult As Boolean) Handles m_GeneralParametersWndVM.m_CloseWindow Me.DialogResult = bDialogResult End Sub #End Region ' Events End Class