Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
xammessagebox
posted

I downloaded the trial en started programming based on the sample in

"Getting Started with xamMessageBox "  The sample is working in VS2010 c#, but not in vb !!!

 XamMessageBox.Show("Warning", "This is a warning message", Function() WriteLine("test"), VerticalPosition.Center, _okMessageStyle,New XamMessageBoxCommand("OK", Function() WriteLine("The 'OK' button was pressed.")})) XamMessageBox.Show("Warning", "This is a warning message", Function() WriteLine("test"), VerticalPosition.Center, _okMessageStyle,New XamMessageBoxCommand("OK", Function() WriteLine("The 'OK' button was pressed.")))

the last parameter  "New XamMessageBoxCommand("OK", Function() WriteLine("The 'OK' button was pressed.")New XamMessageBoxCommand("OK", Function() WriteLine("The 'OK' button was pressed.") gives an error ->  Error 1 Expression does not produce a value.

What is going wrong ???

Parents
No Data
Reply
  • 25
    posted

    In vb.net it has to be a function and not a sub. It works !!!

    Private Sub WriteLine(message As String)
        log.Text = message
    End Sub

    Private Function WriteLine(message As String)
        log.Text = message
    End Function

Children