Parent: UserControl
The ChildWindow class derives from WPF UserControl and provides the integration points required for a custom window to participate in WealthLab 9's multiple document interface. Client Extensions typically derive their custom windows from ChildWindow so WealthLab can manage activation, workspace persistence, chart integration, editor integration, Expert Mode, and window lifecycle events.
Override this method to determine whether WealthLab is permitted to close the ChildWindow. Return false to cancel the close operation, for example when the user has unsaved work and elects not to discard it. The default implementation returns true.
If the ChildWindow contains a chart, override this property to return the corresponding IChart instance. WealthLab uses this interface to interact with the chart. The default value is null.
Call or override this method when the chart mouse moves to a different bar. The default implementation informs the hosting WealthLab Main Window of the BarHistory and bar index so other UI elements can respond to the change.
WealthLab calls this method when the ChildWindow is active and a symbol should be charted. The default implementation calls Chart.ChartThisSymbol when the Chart property is not null.
Override this method to perform cleanup when the ChildWindow closes, such as releasing resources or unregistering event handlers. WealthLab calls Cleanup as part of its closing process.
If the ChildWindow contains a text editor, override this property to return the editor instance. WealthLab uses this value to apply its Editor Preferences when the ChildWindow is activated. The default value is null.
Returns the token of the WealthLab Help page associated with the ChildWindow. The default implementation returns Token.
Override this method to perform initialization after the ChildWindow has been associated with its WealthLab host. Unlike the constructor, MyClientHost is available when Initialize is called.
Returns whether the chart represented by Chart is currently visible in the ChildWindow. The default value is true.
Returns whether the editor represented by Editor is currently visible. WealthLab uses this information when determining whether Editor-related commands should be enabled. The default value is false.
Returns the name of the page that WealthLab should display in the Main Window's left navigation panel when the ChildWindow is first opened. Return an empty string to leave the current page unchanged. Typical values include "DataSets", "Indicators", "Strategies", "BuildingBlocks", and "QuickRef".
Gets or sets the IWLClientHost associated with the WealthLab Main Window hosting this ChildWindow. Client Extensions can use this interface to interact with the parent WealthLab window.
Gets or sets the MDIChild window that contains this ChildWindow. When assigned, ChildWindow registers for activation, deactivation, closing, and title-change events, sizes the MDI window relative to the WealthLab container, creates the corresponding Window menu entry, and applies the current Expert Mode state.
Performs WealthLab's ChildWindow shutdown processing. It removes the corresponding Window menu entry, unregisters MDI event handlers, clears MyMDIChild, and calls Cleanup.
Override this method to perform processing when the ChildWindow loses focus. WealthLab calls it when the containing MDI window is deactivated.
WealthLab calls this method when the ChildWindow is associated with its MDI parent to indicate whether WealthLab Expert Mode is enabled. Override it to hide or simplify explanatory UI when expertModeOn is true.
If the ChildWindow is associated with Strategy Parameters, override this property to return the applicable ParameterList. The default value is null.
Returns a string identifying the type of ChildWindow. Client Extensions should override this property with a unique token, particularly when participating in Workspace restoration. The default value is an empty string.
WealthLab calls this method when Strategy Parameter sliders associated with the ChildWindow are changed. Override it to respond to the updated ParameterList, the autoRun state, and the specific Parameter that changed.
Gets or sets a unique identifier for the specific ChildWindow instance. WealthLab can use this value to retrieve a particular open window instance.
Override this property's getter and setter to participate in WealthLab Workspace persistence. The getter should return a string containing the state required to restore the ChildWindow. The setter should parse a previously saved value and restore that state. The default implementation returns an empty string and ignores assigned values.