Hi Tiago,
change in my code (in ViewModel):
Public Sub Execute(parameter As Object) Implements ICommand.Execute
Dim d = TryCast(parameter, Data)
Dim wnd As New Window With {.Width = 200, .Height = 200}
Dim stp As New StackPanel
wnd.Content = stp
Dim btnOK As New Button With {.Content = "Registrar"}
Dim btnCancel As New Button With {.Content = "Cancelar"}
stp.Children.Add(btnCancel)
stp.Children.Add(btnOK)
AddHandler btnOK.Click, Sub()
wnd.DialogResult = True
wnd.Close()
End Sub
AddHandler btnCancel.Click, Sub()
wnd.DialogResult = False
wnd.Close()
End Sub
If wnd.ShowDialog Then d.Executed = True
End Sub
Result: