Search Framework:
ChildWindow
Namespace: WealthLab.WPF
Parent: UserControl

This UserControl-derived class provides properties and methods that allow it to integrate into the WL8 multiple document interface (MDI) user interface.

Members
AllowWindowClose
public virtual bool AllowWindowClose

Override this method to return a value indicating whether it is permissible for WL8 to close the ChildWindow. You might return false, for example, if the user has unsaved work and indicated that they should cancel a close operation.


Chart
public virtual IChart Chart

If your child window contains a chart, return an instance of the IChart interface, which WL8 will use to interact with the chart in your child window.


ChartThisSymbol
public virtual void ChartThisSymbol(string symbol, DataSet ds)

WL8 will call this method when your child window has the focus, its Chart is visible (IsChartVisible) and the user click a symbol in the DataSets tree. You should typically chart the specified symbol in your chart, using the preferred DataSet specified in the ds parameter.


Editor
public virtual object Editor

If your ChildWindow contains a text editor, you can particpate in the WL8 Editor Preference changes. WL8 will autoamtically update the Preferences of the editor whenever they are changed by the user. You can pass the instance of your Editor control here. It should be an instance of the Alternet.Editor.Wpf.TextEditor class, and ensure you are using the same version of the Alternet.Editor.Wpf package that is installed with WL8.


HelpToken
public virtual string HelpToken

Return the name of the page in the WL8 Help System that describes this child window. The default return value is the Token property.


Initialize
public virtual void Initialize

Override this method to perform any required initialization in your ChildWindow. The advantage of doing this processing here, rather than the constructor, is that at this point the MyClientHost property is available for use.


IsChartVisible
public virtual bool IsChartVisible

Return true if the chart that you're returning in the Chart property is visible in the child window user interface.


IsEditorVisible
public virtual bool IsEditorVisible

If your ChildWindow contains a text editor component, you can override this method to return true when that control is visible. This helps WL8 know when to activate the various menu items under its Edit menu.


JumpToViewPage
public virtual string JumpToViewPage

Causes the view in the main window left naviation panel to switch to the page specified in the return value, when the child window is first opened. The default return value is a blank string, which causes no change in view. Possible return values are:

  • "DataSets"
  • "Indicators"
  • "Strategies"
  • "BuildingBlocks"
  • "QuickRef"

MyClientHost
public IWLClientHost MyClientHost

Returns an instance of the IWLClientHost interface that corresponds to the WL8 main window that is hosting this child window.


SetExpertMode
public virtual void SetExpertMode(bool expertModeOn)

WL8 calls this method to inform your child window whether or not WL8 "Expert Mode" is in effect. When Expert Mode is true, you'd typically hide some pieces of explanatory text in your child window user interface.


Token
public virtual string Token

Return a unique string that identifies your child window.


WindowClosing
protected virtual void WindowClosing()

Override this method to perform any cleanup required when the ChildWindow is closing.


WorkspaceString
public virtual string WorkspaceString

Override the get and the set accessor methods to process a string that is generated when the user saves a Workspace in WL8. You should return a string in the get accessor that contains all of the information required to reconstitute the state of your child window. In the set accessor, parse this string value to restore the state of the child window.