After more research I am virtually certain that the regions do always exist on the various IWS windows.
What prompted me to question this was the fact I am having difficulty displaying a custom view in a particular region.
In the past, I have always displayed views very similar to how some of the sample customization's from Genesys show how to do this:
[code]
container.RegisterType<IMyCustomControlViewModel, MyCustomControlViewModel>();
container.RegisterType<IMyCustomControlView, MyCustomControlView>();
viewManager.ViewsByRegionName["InteractionsBundleRegion"].Add(
new ViewActivator()
{
ViewType = typeof(IMyCustomControlView),
ViewName = "MyCustomControlView",
ActivateView = true,
Condition = MyCustomControlView.MyCustomControlViewCondition
});
[/code]
The above block of code gets executed as IWS starts. Then whenever a new interaction window appears, the code in the defined Condition method is run. If the method returns true, the view is activated, if the method returns false, the method is not activated. This code works as expected and displays my view whenever a new interaction window appears and the condition is met.
I want to activate a view in a different way now. I want to activate a view based on some action a user performs (like clicking a button while an interaction window is already present). For example, imagine I am displaying a custom view with a button in the interaction window, user clicks the button, I want a new view to appear. I guess I am not sure how to accomplish this and am looking for some help.
Here is what I have done so far:
I register my view when IWS is executed:
[code]
container.RegisterType<IMyOtherCustomControlViewModel, MyOtherCustomControlViewModel>();
container.RegisterType<IMyOtherCustomControlView, MyOtherCustomControlView>();
[/code]
I define the ViewActivator in the region I want to the to appear when IWS executes:
[code]
viewManager.ViewsByRegionName["InteractionsBundleRegion"].Add(
new ViewActivator()
{
ViewType = typeof(IMyOtherCustomControlView),
ViewName = "MyOtherCustomControlView",
ActivateView = true,
DynamicOnly = true
});
[/code]
Then, when the user performs the action I want performed in order to trigger the new view to be displayed, I execute the following code:
[code]
viewManager.InstantiateDynamicViewInRegion(caseView, "InteractionsBundleRegion", "MyOtherCustomControlView", "MyOtherCustomControlView");
[/code]
However my new view is never displayed.
Any feedback on what I might be doing incorrectly?
Regards,
Andrew