Jun 9, 2010 at 12:58 PM
Edited Jun 9, 2010 at 1:06 PM
There is an error with Microsoft Visual Studio 2010 when trying to open InteractiveViewport3DSample.Window1.xaml in Designer View.
The error is about the InteractiveVisual3D.IsInteractiveMaterial AttachedProperty applied to System.Windows.Media.Media3D.DiffuseMaterial
System.Windows.Media.Media3D.DiffuseMaterial is inherited from System.Windows.DependencyObject but not from System.Windows.UIElement
And there lies a bug within the InteractiveVisual3D.SetIsInteractiveMaterial and InteractiveVisual3D.GetIsInteractiveMaterial
Currently they both assume the element is an UIElement inherited, but in fact DiffuseMaterial is not.
So I have replaced UIElement types with DependencyObject type.
Since then it works.
Please update the code.