Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Page/Frame

Page/Frame

Scheduled Pinned Locked Moved WPF
questionlearning
3 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    michaelbarb
    wrote on last edited by
    #1

    I am working on an app that is organized sort of as a browser with the frame/page construct. I ran across an interesting behavior that I can not find documented. When you use the Initialize event, it gets executed when the page is instantiated. When you use the Loaded event, it gets executed every time the page becomes content of the frame. It makes sense and is sort of alluded to in the Microsoft documentation, but the implication is easily missed as it applies to frame/page. I have run across other interesting aspects of fame/page that are not clearly documented. Is there a good article or book that really describes the frame/page construct? Everything I have found is rather superficial just giving the highlights or stressing navigation. It should be at least 10 pages long and could be a book of well over 100 pages.

    So many years of programming I have forgotten more languages than I know.

    L 1 Reply Last reply
    0
    • M michaelbarb

      I am working on an app that is organized sort of as a browser with the frame/page construct. I ran across an interesting behavior that I can not find documented. When you use the Initialize event, it gets executed when the page is instantiated. When you use the Loaded event, it gets executed every time the page becomes content of the frame. It makes sense and is sort of alluded to in the Microsoft documentation, but the implication is easily missed as it applies to frame/page. I have run across other interesting aspects of fame/page that are not clearly documented. Is there a good article or book that really describes the frame/page construct? Everything I have found is rather superficial just giving the highlights or stressing navigation. It should be at least 10 pages long and could be a book of well over 100 pages.

      So many years of programming I have forgotten more languages than I know.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      User controls (and Tabs) do the same thing: repeatedly fire the Loaded event. It's not an issue, unless you're initializing in the Loaded event. In those cases, I use an "is Intialized" flag to avoid redundant processing (among other things). Note that "Loaded" doesn't mean it was being created (every time); it runs every time the user control becomes "active" / available. This information is only available to those that ferret it out themselves; as you have just done.

      It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

      M 1 Reply Last reply
      0
      • L Lost User

        User controls (and Tabs) do the same thing: repeatedly fire the Loaded event. It's not an issue, unless you're initializing in the Loaded event. In those cases, I use an "is Intialized" flag to avoid redundant processing (among other things). Note that "Loaded" doesn't mean it was being created (every time); it runs every time the user control becomes "active" / available. This information is only available to those that ferret it out themselves; as you have just done.

        It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

        M Offline
        M Offline
        michaelbarb
        wrote on last edited by
        #3

        I like that phrase, "ferret it out". It is a common idiom. I brings to mind the furry little animal that seems to not have a spine and can get into all kinds of places. Per Wikipedia, The name "ferret" is derived from the Latin furittus, meaning "little thief". In this case wiggling around a lot and stealing results from obscure references.

        So many years of programming I have forgotten more languages than I know.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups