![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Cannot animate a transform in a data template Hi, I want to make a listbox with 3D items so I have created a DataTemplate which contains the 3D object. In the DataTemplate.Triggers I start an animation to rotate the 3D object on mouse over. But when I do mouse over an error is raised: "The value of property 'Transform' in the path '(0).[0].(1).[1].(2).(3).(4)' points an immutable instance of 'System.Windows.Media.Media3D.RotateTransform3D' which may not be manipulated." I have created a sample project: http://www.valil.com/winfx/test.zip Thank you, Valentin Iliescu |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Cannot animate a transform in a data template viliescu wrote: > I want to make a listbox with 3D items so I have created a > DataTemplate > which contains the 3D object. In the DataTemplate.Triggers I start an > animation to rotate the 3D object on mouse over. > But when I do mouse over an error is raised: > "The value of property 'Transform' in the path > '(0).[0].(1).[1].(2).(3).(4)' > points an immutable instance of > 'System.Windows.Media.Media3D.RotateTransform3D' which may not be > manipulated." I don't have an immediate answer to your question, but you do know you can make your life a lot simpler by putting an x:Name directly on the element you want to address with the Storyboard instead of having to use such a long and fragile property path as that, right? In your case perhaps the best approach is probably to name the ModelVisual3D, use that as the target of the Storyboard and build the path from there. Just wanted to make sure you're not killing your fingers (and racking your brain) when working with paths. ![]() HTH, Drew |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Cannot animate a transform in a data template Tried that before but it's not working. For example, if I put in the sample project <DoubleAnimation Storyboard.TargetName="visualModel" Storyboard.TargetProperty="(ModelVisual3D.Transform).(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)" I get this error: "Multi-step property paths may not be specified on an object of type 'System.Windows.Media.Media3D.ModelVisual3D'" Thanks anyway for caring for my fingers and for my mental health ![]() Valentin "Drew Marsh" wrote: > viliescu wrote: > > > I want to make a listbox with 3D items so I have created a > > DataTemplate > > which contains the 3D object. In the DataTemplate.Triggers I start an > > animation to rotate the 3D object on mouse over. > > But when I do mouse over an error is raised: > > "The value of property 'Transform' in the path > > '(0).[0].(1).[1].(2).(3).(4)' > > points an immutable instance of > > 'System.Windows.Media.Media3D.RotateTransform3D' which may not be > > manipulated." > > I don't have an immediate answer to your question, but you do know you can > make your life a lot simpler by putting an x:Name directly on the element > you want to address with the Storyboard instead of having to use such a long > and fragile property path as that, right? In your case perhaps the best approach > is probably to name the ModelVisual3D, use that as the target of the Storyboard > and build the path from there. > > Just wanted to make sure you're not killing your fingers (and racking your > brain) when working with paths. ![]() > > HTH, > Drew > > > |
My System Specs![]() |
| | #4 (permalink) |
| | "Multi-step property paths..." error Like my friend Viliescu (whose chess game I am currently porting to the Nov CTP), I also am encountering the "multi-step property paths may not be specified..." error. In my case, the object whose property I am trying to animate is of type GeometryModel3D. And the property path (specified in C# not in XAML) is: (0).(1).(2) where the operands are: GeometryModel3D.MaterialProperty, DiffuseMaterial.BrushProperty, Brush.OpacityProperty What is the correct property path for animating the opacity of a GeometryModel3D bearing a diffuse material? - David Sklar |
My System Specs![]() |
| | #5 (permalink) |
| | RE: "Multi-step property paths..." error Yes, I had the same problem in Sep CTP. It seems that you cannot use multi-step property paths for non-FrameworkElements so what I had to do is to go up in the tree and use a FrameworkElement as the target for the animation. Valentin "David Sklar" wrote: > Like my friend Viliescu (whose chess game I am currently porting to the Nov > CTP), I also am encountering the "multi-step property paths may not be > specified..." error. > > In my case, the object whose property I am trying to animate is of type > GeometryModel3D. > > And the property path (specified in C# not in XAML) is: > (0).(1).(2) > where the operands are: > GeometryModel3D.MaterialProperty, > DiffuseMaterial.BrushProperty, > Brush.OpacityProperty > > What is the correct property path for animating the opacity of a > GeometryModel3D bearing a diffuse material? > > - David Sklar > > > > > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Cannot animate a transform in a data template The "immutable instance" error you're seeing is actually a bug with 3D and templates used together. Unfortunately, I know of no workarounds in the Nov CTP. ![]() -- Bob Brown [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. "viliescu" <viliescu@discussions.microsoft.com> wrote in message news:A2CA8943-82C6-439C-B582-AE8FA8888175@microsoft.com... > Hi, > > I want to make a listbox with 3D items so I have created a DataTemplate > which contains the 3D object. In the DataTemplate.Triggers I start an > animation to rotate the 3D object on mouse over. > But when I do mouse over an error is raised: > "The value of property 'Transform' in the path > '(0).[0].(1).[1].(2).(3).(4)' > points an immutable instance of > 'System.Windows.Media.Media3D.RotateTransform3D' which may not be > manipulated." > > I have created a sample project: > http://www.valil.com/winfx/test.zip > > Thank you, > Valentin Iliescu > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Merge 2 XML Documents using XSLT Transform | .NET General | |||