The Embedded Newlook Control can be embedded within WPF and WinForms applications and provides access to the Newlook runtime environment. It is the equivalent of the Newlook ActiveX Control, which was included in prior versions of Newlook (version 10 and earlier).
The Embedded Newlook Control supports an API which is similar to the superseded Newlook ActiveX Control API, in order to make the transition from the ActiveX environment to WPF/WinForms as easy as possible. It is important to be aware that there are some differences between the Newlook ActiveX and Embedded Newlook Control APIs.
The Embedded Newlook Control is installed by the Newlook Developer installer.
In order to embed the Embedded Newlook Control within a WinForms application, an instance of the Sytem.Windows.Forms.Integration.ElementHost
must be added to a form, then an instance of 'fresche.NewlookControl' assigned to its 'Child' property. The WinFormsExample project demonstrates how this is done.
While the method of including 'fresche.NewlookControl' in your project is the same as for WinForms, the method for embedding the control is different.
For WPF projects, the 'fresche.NewlookControl' can be embedded directly within a XAML file.
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:newlookControl="clr-namespace:fresche.NewlookControl;assembly=fresche.NewlookControl"
Title="MainWindow" Height="350" Width="525">
<Grid>
<newlookControl:NewlookControl Options="--hidetoolbars=HideMenu" />
</Grid>
</Window>
The Embedded Newlook Control supports an API which can be used to extend the Newlook interface and provide custom functionality.
The Embedded Newlook Control has been developed using the WPF .NET application framework which uses a different rendering technology to the WinForms .NET application framework (which uses classic Win32 rendering methods).
Due to these different rendering techniques, attempts to overlap the Embedded Newlook Control with other WinForms controls can result in 'airspace' issues. To understand this, it is important to consider that in WinForms applications, all top-level windows and all their child controls are usually individual windows (or HWNDS's). In WPF, there is only one HWND - the top-level Embedded Newlook Control. There are exceptions to this - WPF popup windows are separate HWNDs - but typically, all WPF controls are part of the one Embedded Newlook Control HWND.
From a rendering perspective, each visible pixel can only belong to one HWND, so the final display is essentially a series of HWNDs layered on top of each other. This can cause issues if the WinForms application creates or moves a control to overlap the Embedded Newlook Control. If this happens, and the WinForms control has a higher z-order than the Embedded Newlook Control, then the WinForms control will always appear on top of the Embedded Newlook Control, and it is not possible for anything within the Embedded Newlook Control to appear above it. This also means that it is not possible to insert a WinForms control between any of the WPF controls - it can only be above or below everything inside the Embedded Newlook Control.
© 2004-2021 looksoftware. All rights reserved.