Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8432657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:11:15+00:00 2026-06-10T06:11:15+00:00

I have written a program, which import a 3d model in XAML format: <Viewport3D

  • 0

I have written a program,
which import a 3d model in XAML format:

<Viewport3D x:Name="ZAM3DViewport3D" ClipToBounds="true" Width="400" Height="300" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006" xmlns:c="http://schemas.openxmlformats.org/markup-compatibility/2006" c:Ignorable="d">
<Viewport3D.Resources>
    <ResourceDictionary>/**other Elements at the same Level**/
        <Transform3DGroup x:Key="root_boneOR13TR12" >
            <TranslateTransform3D OffsetX="-0" OffsetY="-0" OffsetZ="-0"/>
            <ScaleTransform3D ScaleX="1" ScaleY="1" ScaleZ="1"/>
            <RotateTransform3D>
                <RotateTransform3D.Rotation>
                    <AxisAngleRotation3D Angle="90.00000933" Axis="-1 0 0"/>
                </RotateTransform3D.Rotation>
            </RotateTransform3D>
            <TranslateTransform3D OffsetX="-0.00299196" OffsetY="0.00964678" OffsetZ="0.000916864"/>
        </Transform3DGroup>
    </ResourceDictionary>
</Viewport3D.Resources>

<Viewport3D.Camera>
    <PerspectiveCamera x:Name="FrontOR6" FarPlaneDistance="10" LookDirection="0,0,-1" UpDirection="0,1,0" NearPlaneDistance="0.1" Position="0,-0.0439422,0.729628" FieldOfView="39.5978" />
</Viewport3D.Camera>

<ModelVisual3D>
    <ModelVisual3D.Content>
        <Model3DGroup x:Name="Scene" Transform="{DynamicResource SceneTR7}"> <!-- Scene (XAML Path = ) -->
            <AmbientLight Color="#646464" />
            <DirectionalLight Color="#FFFFFF" Direction="-0.612372,-0.5,-0.612372" />
            <DirectionalLight Color="#FFFFFF" Direction="0.612372,-0.5,-0.612372" />
            <Model3DGroup x:Name="rootOR9" Transform="{DynamicResource rootOR9TR8}"> <!-- root (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3]) -->
                <Model3DGroup x:Name="glasses_meOR11" Transform="{DynamicResource glasses_meOR11TR10}"> <!-- glasses_me (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[0]) -->
                    <Model3DGroup x:Name="root_boneOR13" Transform="{DynamicResource root_boneOR13TR12}"> <!-- root_bone (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0]) -->
                        <Model3DGroup x:Name="main_boneOR15" Transform="{DynamicResource main_boneOR15TR14}"> <!-- main_bone (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0]) -->
                        </Model3DGroup>
                        <Model3DGroup x:Name="right_boneOR19" Transform="{DynamicResource right_boneOR19TR18}"> <!-- right_bone (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[1]) -->
                            <Model3DGroup x:Name="right_bon0OR21" Transform="{DynamicResource right_bon0OR21TR20}"> <!-- right_bon0 (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[1].(Model3DGroup.Children)[0]) -->
                            </Model3DGroup>
                        </Model3DGroup>
                        <Model3DGroup x:Name="left_bone_OR25" Transform="{DynamicResource left_bone_OR25TR24}"> <!-- left_bone_ (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[2]) -->
                            <Model3DGroup x:Name="left_boneOR27" Transform="{DynamicResource left_boneOR27TR26}"> <!-- left_bone (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[2].(Model3DGroup.Children)[0]) -->
                            </Model3DGroup>
                        </Model3DGroup>
                    </Model3DGroup>
                    <GeometryModel3D x:Name="glasses_meOR11GR12" Geometry="{DynamicResource glasses_meOR11GR12}" Material="{DynamicResource ER___Default_MaterialMR1}" BackMaterial="{DynamicResource ER___Default_MaterialMR1}"/>
                </Model3DGroup>
                <Model3DGroup x:Name="glasses_m0OR32" Transform="{DynamicResource glasses_m0OR32TR31}"> <!-- glasses_m0 (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[1]) -->
                    <Model3DGroup x:Name="root_bone1OR34" Transform="{DynamicResource root_bone1OR34TR33}"> <!-- root_bone1 (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[1].(Model3DGroup.Children)[0]) -->
                        <Model3DGroup x:Name="main_bone1OR36" Transform="{DynamicResource main_bone1OR36TR35}"> <!-- main_bone1 (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[1].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0]) -->
                            <Model3DGroup x:Name="main_eff1OR38" Transform="{DynamicResource main_eff1OR38TR37}"> <!-- main_eff1 (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[1].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0]) -->
                                <Model3DGroup x:Name="right_bon1OR40" Transform="{DynamicResource right_bon1OR40TR39}"> <!-- right_bon1 (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[1].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0]) -->
                                    <Model3DGroup x:Name="right_bon2OR42" Transform="{DynamicResource right_bon2OR42TR41}"> <!-- right_bon2 (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[1].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0]) -->
                                    </Model3DGroup>
                                </Model3DGroup>
                                <Model3DGroup x:Name="left_bone0OR46" Transform="{DynamicResource left_bone0OR46TR45}"> <!-- left_bone0 (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[1].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[1]) -->
                                    <Model3DGroup x:Name="left_bone1OR48" Transform="{DynamicResource left_bone1OR48TR47}"> <!-- left_bone1 (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[1].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0].(Model3DGroup.Children)[1].(Model3DGroup.Children)[0]) -->
                                    </Model3DGroup>
                                </Model3DGroup>
                            </Model3DGroup>
                        </Model3DGroup>
                    </Model3DGroup>
                </Model3DGroup>
            </Model3DGroup>
        </Model3DGroup>
    </ModelVisual3D.Content>
</ModelVisual3D>

I want to access the Transform3DGroup x:Key=”root_boneOR13TR12″ Element via C#
and want to modify the AxisAngelRotation Property if its needed.

sincerely,
bbklol

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:11:17+00:00Added an answer on June 10, 2026 at 6:11 am

    Let’s start with defining a storyboard: when you will run it, it will actually rotate your objects!

    And then, with some animations (also DoubleAnimation works well), you can set the Rotation property of your RotateTransform3D (see below).

    In your case, to answer your question, I think you should use a syntax very near this (I kept your XAML path, signed with [ ]….remove them!!):

    Storyboard.TargetProperty="[(Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3].(Model3DGroup.Children)[0].(Model3DGroup.Children)[0])].(ModelVisual3D.Transform).(Transform3DGroup.Children)[2].(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)"
    

    I show you just an example, maybe you can understand in a simpler way…

    This one is the Storyboard that will rotate the items in the ViewPort3D below:

    <Storyboard x:Key="RotationStoryboard">
        <!--This is an horizontal rotation-->
        <DoubleAnimation Storyboard.TargetProperty="(Viewport3D.Children)[0].(ModelVisual3D.Transform).(Transform3DGroup.Children)[0].(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)"
            BeginTime="0:0:0.25"
            From="360"
            To="0"
            Duration="0:0:4.5"
            RepeatBehavior="Forever" />
        <!--This is an orbital horizontal rotation (I removed the other rotation on first transformation)-->
        <DoubleAnimation Storyboard.TargetProperty="(Viewport3D.Children)[1].(ModelVisual3D.Transform).(Transform3DGroup.Children)[3].(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)"
            From="360"
            To="0"
            RepeatBehavior="Forever"
            Duration="0:0:3.5" />
    </Storyboard>
    

    An this ix the XAML code of the objects…

    <Viewport3D>
        <Viewport3D.Children>
            <!--First object-->
            <ModelVisual3D>
                <ModelVisual3D.Transform>
                    <Transform3DGroup>
                        <RotateTransform3D>
                            <RotateTransform3D.Rotation>
                                <AxisAngleRotation3D Angle="360"
                                                     Axis="0,1,0" />
                                </RotateTransform3D.Rotation>
                        </RotateTransform3D>
                    </Transform3DGroup>
                </ModelVisual3D.Transform>
                <model3d:Sphere3D />
            </ModelVisual3D>
            <!--Second object-->
            <ModelVisual3D>
                <ModelVisual3D.Transform>
                    <Transform3DGroup>
                        <RotateTransform3D>
                            <RotateTransform3D.Rotation>
                                <AxisAngleRotation3D Angle="360" 
                                                     Axis="0,1,0" />
                            </RotateTransform3D.Rotation>
                        </RotateTransform3D>
                        <ScaleTransform3D ScaleZ="0"
                                          ScaleY="0"
                                          ScaleX="0"/>
                        <TranslateTransform3D OffsetX="3.5" />
                        <RotateTransform3D CenterX="0"
                                           CenterY="0"
                                           CenterZ="0">
                            <RotateTransform3D.Rotation>
                                <AxisAngleRotation3D Angle="360" 
                                                     Axis="0,1,0" />
                            </RotateTransform3D.Rotation>
                        </RotateTransform3D>
                    </Transform3DGroup>
                </ModelVisual3D.Transform>
                <model3d:Sphere3D x:Name="SatelliteSphere">
                        <model3d:Sphere3D.Transform>
                            <RotateTransform3D CenterX="-1"
                                               CenterY="-1"
                                               CenterZ="-1" />
                        </model3d:Sphere3D.Transform>
                </model3d:Sphere3D>
            </ModelVisual3D>
        </Viewport3D.Children>
    </Viewport3D>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So right now I have written a python program which takes the path name
I have a program which i have myself written in java, but I want
I have written this program, which sorts some ints using a functor: #include<iostream> #include<list>
I have a debugging program which I've written to attach to a process and
Hi I have a program written in C++ in which one or two functions
I am beginning to port a program which is written in C and have
I have a simple program (written in Java) which uses the google protocol buffer
I have written a program which I run after connecting to the box over
I have written a program which takes a file as input and whenever it
I have written sample program which uses XSLT to generate HTML response. Check below

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.