When working with multiple newlook sessions from .NET, you may want to pass information from the WPF .NET client to each session that is created. This is epecially handy if you want to gather information once and then pass it to each session instead of having each individual session take the performance hit.
You can easily attach to the after sigon event which will be fired after each newlook session signs on. The best place to attach to this event is in your Browser code behind in your System WPF project.
In the browser code behind, attach to the ae_AfterNewlookSignOn event in the Browser constructor. In the event handler, you can get access to the newlook reference and then call the am_SetValue method.
public Browser() { // Set the Splash Window Type ap_SplashWindowType = typeof(Splash); InitializeComponent(); // Attach to event AB_SystemController.ap_NewLookModel.ae_AfterNewlookSignOn += Ap_NewLookModel_ae_AfterNewlookSignOn; } private void Ap_NewLookModel_ae_AfterNewlookSignOn(object sender, System.EventArgs e) { var newlookReference = sender as AB_NewlookOCXControl; if (newlookReference != null) { newlookReference.am_SetValue("GlobalVariable", "Value"); } }