Content can be loaded in multiple ways, depending on wether or not you'd like to load it from C# or in Xaml. Typically, if you're creating a multi-platform solution, you would do this in the game class. This page will show how to do it from Xaml, if you need to do it from C#, please go to here for more details.

Mesh control

For handling 3D geometries that are loaded from a file, there is a control called Mesh, also located in the Balder.Objects.Geometries namespace. The control is a Node and has all the properties of a node, such as positioning, color and more. For specifying what 3D model to load, it has a property called AssetName. The AssetName can be specified in two ways, either as a relative path to the path defined in the ContentManager, which is by default pointing to a subfolder in your Silverlight project called Assets. You can in addition specify in detail were your asset is located, and the Silverlight implementation of the file loading mechanism will load the asset correctly. The format of the specific path is : "/Package name;component/asset name".

IMPORTANT: All assets must be marked as "Resource" in the "Build Action" property of the file in your project.

Add the mesh control:
<Geometries:Mesh AssetName="teapot.ase"/>

Or referencing it with a full path:
<Geometries:Mesh AssetName="/MyGameApp;component/Assets/teapot.ase"/>

Last edited Jul 26, 2010 at 11:22 PM by adept, version 3

Comments

adept Jul 28, 2010 at 8:10 PM 
I'm working on the Tutorials. I will be posting them somewhere else. If you download the entire source and look at the SampleBrowser solution in Solutions and check out the programatic samples - they do it all in C#.

zeyoo Jul 28, 2010 at 3:36 PM 
The page you give how to load content from C# is nothing.