locked
Where is WpfServicePort? RRS feed

  • Question

  • Hello!

    The problem is:

    There is a class that is inherited from the ServiceBase class from the Microsoft.Dss.Core namespace. Earlier this class used in its work property ServiceBase.WinFormsServicePort for creating a service UI.Something like that:

    Manager.Initialize(WinFormsServicePort); // the property of the ServiceBase class

    Now all the system is travelling to WPF and we are going to use the WpfServicePort instead of WinFormsServicePort. But in the ServiceBase class there is no property for WpfServicePort. So where may the correct WpfServicePort be to initialize the Manager?

    Thanks.

    Saturday, December 13, 2008 6:25 PM

Answers

  • WPF is supported by the Microsoft.Ccr.Adapters.Wpf DLL so you need a reference to this. 

    Then you can define an alias for the namespace, and then declare a service port as follows:

    using ccrwpf = Microsoft.Ccr.Adapters.Wpf;  
    ...  
     
     
    ccrwpf.WpfServicePort _wpfServicePort;  
     
     

    Please have a look at the WPF example which is in:
    Microsoft Robotics Dev Studio 2008\samples\UX\WpfTextToSpeechUI

    Trevor

    • Marked as answer by Trevor Taylor Wednesday, December 31, 2008 9:56 PM
    Thursday, December 18, 2008 4:42 AM

All replies

  • WPF is supported by the Microsoft.Ccr.Adapters.Wpf DLL so you need a reference to this. 

    Then you can define an alias for the namespace, and then declare a service port as follows:

    using ccrwpf = Microsoft.Ccr.Adapters.Wpf;  
    ...  
     
     
    ccrwpf.WpfServicePort _wpfServicePort;  
     
     

    Please have a look at the WPF example which is in:
    Microsoft Robotics Dev Studio 2008\samples\UX\WpfTextToSpeechUI

    Trevor

    • Marked as answer by Trevor Taylor Wednesday, December 31, 2008 9:56 PM
    Thursday, December 18, 2008 4:42 AM
  • Thank you for your answer!
    Thursday, December 18, 2008 11:50 AM