0

Is there anyway to obtain the HostView of a token without activating that token? In my program I activate the token when the wpf window loads and then, in a separate class, I need to access the HostView of a specific token.

After some initial checks online I could not find any method that would do this, so my guess is that there is not a 1:1 correlation between a token and a specific HostView (ie one token could have multiple views). Am I way off on this?

Mike Lorenzana
  • 506
  • 4
  • 20
  • 1
    I think you are right since the [QualificationData] (http://msdn.microsoft.com/en-us/library/system.addin.hosting.addintoken.qualificationdata.aspx) is always empty for the HostViewOfAddIn segment. Anyway, the HostView should be accesses only after activation. Why don't you pass it from one class to the other (dependency injection)? – Panos Rontogiannis May 08 '12 at 12:11
  • Thanks for the link, it makes more sense why it can't be done now. I'll give dependency injection a shot. – Mike Lorenzana May 08 '12 at 15:24

0 Answers0