Changes to Visual not always visible

Topics: Developer Forum
Dec 10, 2007 at 11:09 AM
Hi guys

First of all, thanks for 3DTools :-) We are currently using it extensively in a project and mostly it has been smooth sailing.

We do have one problem though: sometimes, the InteractiveVisual3D does not update correctly when there are changes to the underlying Visual.

For example, as the Visual for an InteractiveVisual3D we have a templated Button. The button binds to its DataContext:

<Button Content="{Binding Label}" Style="{StaticResource ButtonStyle}" />

Now when we change the button's DataContext, the InteractiveVisual3D does not update properly. Only after mousing over the button does the new label appear.

To solve this issue we have added a method InteractiveVisual3D.ForceVisualUpdate() which simply calls GenerateMaterial() to regenerate the material. We call this method immediately after changing the DataContext, and this works.

A possibly related issue is that sometimes when we change the Visual of an InteractiveVisual3D, we are left with an empty 3D model. Again, the Visual appears again on mouse over.

Is there a fix/workaround planned for these issues and/or is it possible to incorporate a ForceVisualUpdate() method in the next release?