If you are using SampleViewer on WPF project, please follow these steps.

1. For example, if you are trying to use SampleViewer with MainWindows, please get into the constructor of MainWindows.xaml.cs.

2. Please input these codes before InitializeComponent();

   Copy
   WPF Project

       1
       2
       3
       if(!ViDi2.UI.ViDiSuiteServiceLocator.IsInitialized)
       ViDi2.UI.ViDiSuiteServiceLocator.Initialize();
       InitializeComponent();

If you are using SampleViewer on Winform project, please follow the step.

1. For example, if you are trying to use SampleViewer with Form1, please go to the constructor of Form1.

2. Please type these codes before InitializeComponent();

   Copy

   Winform Project

       1
       2
       3
       if(!ViDi2.UI.ViDiSuiteServiceLocator.IsInitialized)
       ViDi2.UI.ViDiSuiteServiceLocator.Initialize();
       InitializeComponent();