I have converted the following C# code to VB.NET code via http://converter.telerik.com/
public static MessageBoxResult Show(string caption, string text, MessageBoxButton button, MessageBoxImage image)
{
_messageBox = new WpfMessageBox { Label1 = { Content = caption }, Label2 = { Content = text } };
return _result;
}
This is the converted VB.NET code.
Public Shared Function Show(caption As String, text As String, button As MessageBoxButton, image As MessageBoxImage) As MessageBoxResult
_messageBox = New WpfMessageBox() With { _
Key .Label1 = {Key .Content = caption}, _
Key .Label2 = {Key .Content = text} _
}
Return _result
End Function
Here is the error: