Class PagFunAgregarPersona
  Inherits PageFunction(Of CPersona)
  Private nuevaPersona As New CPersona()

  Public Sub New()
    InitializeComponent()
    Me.DataContext = nuevaPersona
  End Sub

  Private Sub btAceptar_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    ' Aceptar la información introducida
    OnReturn(New ReturnEventArgs(Of CPersona)(nuevaPersona))
  End Sub

  Private Sub btCancelar_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    ' Operación cancelada
    OnReturn(Nothing)
  End Sub
End Class
