Nevron Open Vision Documentation
User Interface / Windows / Child Windows
In This Topic
    Child Windows
    In This Topic
     My First Child Window

    A child window is represented by the NChildWindow class that derives from the NWindow class. 

    In the Windows and The Desktop topic we have already mentioned that in order to be functional a window need to reside in the hierarchy of the NDesktop element singleton. Unlike top-level windows, which can be added to the Windows collection of each window, child windows can only be added to the NDesktop-Windows collection. This means that child windows are typically root windows for your application.

    Creating a child window is typically the first thing to do, after you install NOV for a particular environment - see the Installing NOV topic. Once you create that child window and add it the NDesktop-Windows collection, this child window needs to be explicitly hosted by some native for the presentation layer host, as seen in the following topics:

    Installing NOV for Windows - WinForms

    Installing NOV for Windows - WPF

    Installing NOV for Silverlight

    So if you have followed the getting started topics, you have already created your first child window and populated it with a label that display the "Hello World from Nevron Open Vision" string.

     Why Child Windows?

    You may ask yourself - do we need child windows when we have top-level windows? Well there are several reasons for which child windows are needed:

    • Mix NOV content with native for the Presentation Layer content - because a child window is hosted by a native for the presentation layer host, you can put that host in a native WPF-Window, WinForm-Form etc., or whatever name for a window the specific presentation layer has. In this way you can embed NOV content inside already existing WPF, WinForm, Silverlight etc. user interfaces.

      The other operation - embed native Presentation Layer content in NOV content is something we do not plan to implement. It will simply tempt you to create unportable user interfaces, and on the other hand not all presentation layers in which we integrate and plan to integrate NOV, have the needed feature set to conform to NOV standards for graphics, layout and user input.
    • Create a Main Application Window that has the really native OS look and feel - NOV top-level windows do not use the native for the OS top-level window frame and title bar. So although through styling you can achieve results that very much resemble the specific OS theme window frame, there still are some non-client area effects that cannot be replicated (for example the Windows 7 Aero Theme applies an image filter effect on the window frame, that also grabs pixels from the windows below it).


    See Also