2

What interface I need to implement to put my own WPF user control into the region as in the picture. I need to add some custom business logic to WDE, please someone show me the better way to do this.

WDE

I can replace some views by using:IObjectContainer.RegisterType<Interface,Class>(); But I don't know how to replace the interaction window.

fdistorted
  • 343
  • 3
  • 15

1 Answers1

2

Its not about just registering you must set your view at viewmanager. Firstly you must create your view and viewmodel , after that you must add your view to related region on viewmanager like this

viewManager.ViewRegionByName["InteractionDetailsRegion"].Add(new ViewActivator(){
ViewType = typeof(IMyView), ViewName = "MysampleView"
})

After register your view you must see your wpf usercontrol at acording region. You can check regions from genesys document wiki. But for trying you can check ToolbarWorkplaceRegion for start, it should insert your view to main window.

orhun.begendi
  • 937
  • 3
  • 16
  • 31
  • 1
    Thanks! I`ve made the implementation of interface `public partial class CustomView : UserControl, IMainToolbarInteractionContainerView` and the registration of it in `Initialize()` `container.RegisterType();` and it is works good. When I accept the call my custom view activates automatically. – fdistorted Mar 21 '17 at 14:08
  • One more question, how can I reregister view after initialization? I have few variants of interaction window, how can I change the window according to called routing point. – fdistorted Mar 21 '17 at 15:45
  • 1
    Actually don't do it like this, because internally genesys sdk using unity as IoC, so if you not register at init time, you can get an exception more likely. But you do have a solution for hide/show for views, you can add "condition" to ViewActivator, and return true/false at run time. This is not everything you want. But trust me this is the only way to do this. Other ways really painful and exceptional. I developed 2+ years IWS/WDE. – orhun.begendi Mar 22 '17 at 07:44