Reader3dsSource Property |
Namespace: Ab3d
This property is used when Reader3ds is used as Resource.
To read a file from code use ReadFile(String, Viewport3D) or other ReadFile methods.
It is also possible to use 3D models from 3ds files with Model3ds class.
The following sample shows how to use Reader3ds as resource:
<Page.Resources> <ab3d:Reader3ds x:Key="MyReader3ds" Source="/Resources/robotarm.3ds"/> <Page.Resources>
After defining the Reader3ds as resource it can be used with binding to its properties:
<Viewport3D Camera="{Binding Source={StaticResource MyReader3ds}, Path=Cameras[0]}"> <ModelVisual3D Content="{Binding Source={StaticResource MyReader3ds}, Path=RootModel3DGroup}"/> </Viewport3D>