Solved

Convert to VB.net

Posted on 2014-03-18
3
294 Views
Last Modified: 2014-03-18
I'm trying to convert some C# code to VB.net, but the control in question is from the WP Toolkit and has no intellisense to help me work out what is happening.  I'm guessing that it's an event handler but I don't know where s1 comes from.  Can someone VBize it please?

messageBox.Dismissed += (s1, e1) =>
    {
        switch (e1.Result)

Open in new window

0
Comment
Question by:Dodsworth
  • 2
3 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39936975
Please provide the delegate definition for the Dismissed property.
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 39937324
There doesn't appear to be one.  But I found this in the object browser..

Public Event Dismissed(sender As Object, e As Microsoft.Phone.Controls.DismissedEventArgs)
Member of Microsoft.Phone.Controls.CustomMessageBox
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39937436
That's what I was after  = )

I don't work in VB often enough to remember all of the intricacies of implicit delegates, but hopefully this is an accurate translation. You may be able to nix the "ByVal ... As XXX" parts and just leave the variable names.

AddHandler messageBox.Dismissed, Function (ByVal sender As Object, ByVal e As EventArgs)
                                     Select Case e1.Result
                                         Case ...
                                     End Select
                                 End Function

Open in new window

0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question