This project has moved and is read-only. For the latest updates, please go here.

Toolkit and XBAPs

Jun 28, 2010 at 6:46 PM


I really love the the toolkit and have used it a couple of times. Unfortunately in the latest XBAP app running in partial trust I ran into a couple of problems.

The WPF part of the toolkit does not allow partial trusted callers. I added the [assembly:AllowPartiallyTrustedCallers] to the assemblyinfo.cs of the MVVMlight asembly and got the ViewModelBase part running.

Unfortunately it seems that Microsoft for some reason is not allowing partially trusted callers in referenced assemblies of the WPF implementation of System.Windows.Interactivity.dll. Derivatives of

TriggerAction<T> or Behavior<T> will throw an exception -> EventToCommand. It seems a bit strange to me, since they have a version for Silverligt use, so I guess it´s not for security reasons? Since this .dll has its origin in Blend and I guess it supports XBAPs it seems even more strange - the MS forum didn´t have an explanation :-(

1) Have you faced similar problems with XBAP solutions or am I doing something terrible wrong?

2) Have you got an idea for a workaround with respect to attached behaviors and EventToCommand (except running the XBAP with full trust :-D).