Author Topic: Interaction Workspace / Add a custom view to a multi-view region  (Read 3490 times)

Offline miurax

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Hello,

I've created a custom view to handle interaction information and I'm currently using IW's main window to display this view. What I would like to do is to add my view to the multi-view region called "ConsultationBundlesRegion" which belongs to the "Interactions Window" and is created for each interaction. My problem is that when I try to add my view it seems to overwrite the already existing views in that region or some times not even display it at all. This is my code for view registration:

container.RegisterType<IMyView, MyView>();
container.RegisterType<IMyViewModel, MyViewModel>(true);

viewManager.ViewsByRegionName["ConsultationBundlesRegion"].Insert(0, new ViewActivator() { ViewType = typeof(IMyView), ViewName = "MyView", ActivateView = true });

This is working fine for the "ToolbarWorkplaceRegion" and all the expected data is updated in the view. As you can see I'm using a singleton viewmodel even if I've heard that this is a bad solution, but it was the only way I could display udata in my view.

I would be really grateful for some tips and tricks regarding the multi-view region and guidance concerning usage of viewmodels, singleton or not. This is my first project developing extensions for IW and I'm new to the MVVM concept.

Thanks in advance,
miurax

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: Interaction Workspace / Add a custom view to a multi-view region
« Reply #1 on: October 24, 2013, 10:38:04 AM »
Unfortunately, the developer documentation does not contain all parts with technical depth and each version working differently in some parts/modules. So, I have only two suggestion and recommendation for you:

1. Write code, write code and write code. Test, test and test.
2. Visit training for Genesys developers (it is very useful and explain many, many things about Genesys SDK)

In general read about the MVVM (Model - View - ViewModel) architecture layet, but as first try to understand Genesys and his SDK.