Outlook bar does not work with XBAP

Jun 30, 2009 at 3:23 PM
Edited Jun 30, 2009 at 3:24 PM

I tried to convert your Outlookbar sample application wto XBAP, as i have such requirement and trying to avoid use of commercial libraries unnecessarily. Odyssey looked like a rescue. but it gives me an error when used with XBAP.

First I got this error:

'pack://application:,,,/Odyssey;Component/Themes/Ribbon/RibbonWindow.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Request for the permission of type 'System.Security.Permissions.UIPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.  Error at object 'System.Windows.ResourceDictionary' in markup file 'Odyssey;Component/Themes/Ribbon/Generic.xaml' Line 7 Position 29.

This can be resolved by Setting the Security level to "This is a Full Trust application". Although this is not a preferred method of solving the problem, atleast it keeps you get going for now.

But the real problem is next you get  the win32 Exception "Cannot create a top-level child window"

System.ComponentModel.Win32Exception was unhandled
Message: Cannot create a top-level child window

I cannot get to the source of the error even if I work directly off of the source (instead of referring to the dll). Any help would be appreciated.