UI from AddIn

Feb 15, 2009 at 9:41 PM
Hello everybody,

I've defined a contract, which looks something like that:
....
 INativeHandleContract GetUI();
...

The AddIn implements the contract:
....

 public FrameworkElement GetUI()
{
    return = new MagicUI();
}


The Host-Application loads and activates the AddIns this way:
....
AddInStore.Rebuild(PipelineStoreLocation.ApplicationBase);
AddInToken.EnableDirectConnect = true;
Collection<AddInToken> addins = AddInStore.FindAddIns(typeof(T), PipelineStoreLocation.ApplicationBase);
......
MyContract addinInstance = addin.Activate<MyContract>(AppDomain.CurrentDomain);
......

The Host-Application displays the UI I got from the AddIn correct, but there are several problems with the UI from the AddIn:

  • When I try to set IsEnabled=false; on the FrameworkElement I got from the UI it fails --> nothing is happening, no error, nothing.
  • The navigation with the <TAB> Key fails on the UserControls.
  • I added the UI from the AddIn to a ScrollViewer on the Host-Application --> when scrolling the added UI moves in front of all other UI Elements
What am I doing wrong? Is the described behaviour normal?
Any ideas?

Thank you in advance.