Field not found: CenterProperty

Mar 10, 2011 at 3:52 AM

Hey Blake,

I'm getting a new issue with the ThrowSVI function as below. Its wierd because another SVI in a seperate ScatterView (in the same project) works fine. Any ideas?

Rav

 

Field not found: 'Microsoft.Surface.Presentation.Controls.ScatterViewItem.CenterProperty'.

   at Blake.NUI.WPF.Surface.Utility.SurfaceAnimateUtility.ThrowSVI(ScatterViewItem svi, Point targetPoint, Double targetOrientation, Double fromTime, Double toTime, IEasingFunction ease)   at Waterloo.Main.View.GadgetView.<.ctor>b__1(Object s, RoutedEventArgs e) in C:\Users\Rav\My Projects\EVA\Showcase\Waterloo\Waterloo.MultiTouch\View\GadgetView.xaml.cs:line 78   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)   at MS.Internal.FrameworkObject.OnLoaded(RoutedEventArgs args)   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)   at System.Windows.Threading.DispatcherOperation.InvokeImpl()   at System.Threading.ExecutionContext.runTryCode(Object userData)   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)   at System.Windows.Threading.DispatcherOperation.Invoke()   at System.Windows.Threading.Dispatcher.ProcessQueue()   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)   at System.Windows.Application.RunInternal(Window window)   at System.Windows.Application.Run()   at Waterloo.Main.App.Main() in C:\Users\Rav\My Projects\EVA\Showcase\Waterloo\Waterloo.MultiTouch\obj\Debug\App.g.cs:line 0   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)   at System.Threading.ThreadHelper.ThreadStart()

Coordinator
Mar 10, 2011 at 3:55 AM

Hi Rav,

(By the way, you can call me Josh. My last name is Blake.)

Sounds like you might be mixing v1 and v1.5 assemblies. Directly after you compile, check your warnings for an assembly dependency version warning. Check your references and you can also use the assembly redirect method in step 2 of this blog:

http://nui.joshland.org/2010/07/sharing-binaries-between-surface-and.html

Thanks,

Josh

Mar 10, 2011 at 4:30 AM

oops sorry Josh!

I'm not getting any warnings related to surface. I'm referencing the following:

Blake.NUI.WPF v0.1.0.0
Blake.NUI.WPF.Surface v0.1.0.0
Blake.NUI.WPF.SurfaceToolkit v0.1.0.0
Microsoft.Surface.Presentation v1.5.0.0
Microsoft.Surface.Presentation.Generic v1.5.0.0 

I also added that AssemblyBinding section into my app.config. Still getting the same issue.

Coordinator
Mar 10, 2011 at 4:33 AM

Remove the reference to Blake.NUI.WPF.Surface. That assembly is meant to be used only when targeting Surface v1. Blake.NUI.WPF.SurfaceToolkit has the same code except written for v1.5, which is what you want.

Mar 10, 2011 at 4:36 AM

dont worry - im stupid

Was using the SurfaceAnimateUtility from wrong assembly. Didn't realise there was a difference.

Thanks for the help