locked
Adding Privacy Policy in a VB Windows 8 Application

    Question

  • I have created an application which is written in VB - Not C# (All the other articles only cover C#!)

    I have the following code but I am receiving the error: 'Public Event SettingsPane()' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.' 

    Code: 

    The vb code in my App.xaml.vb file :
    Imports Windows.UI.ApplicationSettings'Place in the onlaunched sub
            AddHandler SettingsPane.GetForCurrentView.CommandsRequested, Sub(sender, e) e.Request.ApplicationCommands.Add(New SettingsCommand("privacy", "Online Privacy Policy", Sub() privacyGo()))

    'Create a sub
    Private Sub privacyGo()

            Dim privacy As New Uri("http://myprivacy.com")

            Windows.System.Launcher.LaunchUriAsync(privacy)

        End Sub


    • Edited by J Bithell Friday, February 07, 2014 6:37 PM
    Friday, February 07, 2014 6:37 PM

All replies

  • Where do you have this code?

    Other than warnings about privacyGo not Awaiting LaunchUriAsync it works fine for me when I add it to my page.

    --Rob

    Friday, February 07, 2014 8:08 PM
    Moderator