Has anyone done Reusable Modal window from Jan vander hagen RRS feed

  • Question

  • Hello All

    I am new to Lightswtich

    I am working on trying to get the reusable modal window, to work on my application but the sad part is that 

    I am using VB.net rather than C#, 

    So Far this is what I have . 

    Public Class AssetScreen
            'Private ItemAddDialogHelper As DialogHelper
            Private newAssetModalDialogViewModel As MyModalWindow
            Private Sub AssetScreen_InitializeDataWorkspace(saveChangesTo As List(Of IDataService))
                'ItemAddDialogHelper = New DialogHelper(Me.Assets, "AssetDialog")
            End Sub
            Private Sub AssetAdd_Execute()
                ' Write your code here.
                Dim currentAssetId As Integer = Me.Assets.SelectedItem.Id
                Dim currentItemName As String = Me.Assets.SelectedItem.Item
                                                                                 newAssetModalDialogViewModel = New MyModalWindow(Me.Assets)
                                                                                 newTicketModalDialogViewModel.AssetId = currentCustomerId
                                                                                 newTicketModalDialogViewModel.CustomerName = currentCustomerName
                                                                                 'the caller, which will be 'greyed out'
                                                                                 'the modal dialog VM
                                                                                 ModalHelper.ShowModalWindow(Me, newTicketModalDialogViewModel)
     End Function)

    I am not sure how to finish it from here, as i cannot figure out how to get the CreateInstance() method to come up

    If anyone has done this in VB.net any pointers and help would be appreciated


    Lightswitch noob


    Friday, June 27, 2014 2:58 AM


All replies

  • I have not tried it.  It looks good but might be difficult especially if you're new to lightswitch.  Have you looked at: http://lightswitchcentral.net.au/Blogs/tabid/83/EntryId/4/Improved-Modal-Window-Helper.aspx

    It's not hard to implement and is written in VB.

    • Marked as answer by DWisenbaugh Saturday, June 28, 2014 12:06 AM
    Friday, June 27, 2014 4:18 AM
  • You can get C# automatically translated into VB.NET at a number of web sites. For example http://converter.telerik.com/Default.aspx

    The converters usually do a reasonable job but may struggle on advanced features such as Lambda expressions or AddHandler directives.

    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Friday, June 27, 2014 9:38 AM