Results 1 to 4 of 4

Thread: my.settings

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2009
    Posts
    61

    my.settings

    how do I save my.settings when closing a xaml page

    Normally do this in winform via
    Code:
     Private Sub myform_FormClosing(sender As Object, e As Forms.FormClosingEventArgs) Handles MyBase.FormClosing
     My.Settings.Save()
        End Sub

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: my.settings

    By "xaml page", do you actually mean a Window, which is the WPF equivalent of a WinForms Form, or a Page, which is something that gets hosted inside a browser window or the like? I would expect the former but your imprecise language is ambiguous.

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2009
    Posts
    61

    Re: my.settings

    Hi

    I have created a WPFBrowser application, which has a xaml page which contains a windowsformhost, which displays a windows form. I can normally save my settings within the windows form closing events. But I am unsure how to do this from within the xaml page, as there are no closing events in the page, as its a browser hosted application.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: my.settings

    I guess the closest analogue that the Page class has is Unloaded.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width