Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Convert to VB.net

Posted on 2014-03-18
3
Medium Priority
?
316 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline
Suggested Courses

877 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