3D Axis

Sep 20, 2010 at 11:32 AM


 i am new to this 3d and i am creating some sample where i need to create 3d Cartesian system.after creating 3d Cartesian system i should able to add any 3d object at any place in my Cartesian.

i.e. i call something like Draw3daxis() will draw 3d(x,y and z axis)

and after that if i  call insertObject(Cube,position) will add cube at specified  position.



can any one tell me how could i do this step wise or any samples available.

Please reply ASAP.



Sep 21, 2010 at 7:34 AM

Balder uses a left-handed coordinate system (http://msdn.microsoft.com/en-us/library/bb204853(VS.85).aspx) with X positive going to the right, Y positive going up, Z positive moving into the screen.

I'm not sure if I understand what you want to do. But if you want to place a Cube/Box in 3D, this is very simple to accomplish with Balder - please look at the screencast for more info : Getting started screencast


Sep 24, 2010 at 7:52 AM

@adpet:Thanks it helps me good.

I am trying to  make smothing like





do u have any idea about creating such kind of 3d grid where i specify row,column of element  and  that element will be put over there.

e.g. cube at (2,3) with height


awaiting for your reply



Sep 24, 2010 at 11:05 AM


that should be very easy to create with Balder. Have you had a look at the SampleBrowser on the frontpage? There is a category in it called Data that shows how to use DataBinding with Balder and shows a bar-chart, which would be something similar to what you want to achieve. In the SampleBrowser there is a source-code tab that shows how its all done.


Hope that helps,

Sep 24, 2010 at 11:18 AM

I have already tried it  but i got following problem

1)when i click on Add Value button  only newly added bar is shown rest of get disappear.I have copied code from online sample and also downloaded your  source code of balder but still same o/p

2)all bar are in one line not in 3d space.


reply as ASAP

Sep 24, 2010 at 11:53 AM

Did you try this : http://www.ingebrigtsen.info/Balder/SampleBrowser/TestPage.html

Just tested it here and it adds bars. Only bug in that is the background is moved into a wrong place.


The concept is pretty simple. One uses the NodesControl and creates a template for each item that represents the view of every dataitem. You can nest NodesControl and have it in your template even. 
Also worth mentioning is the InstancingNodes, which is not in but in the latest source code - if you download the entire source and open the SampleBrowser for Silverlight solution file, you should be able to have a look at that as well.

The InstancingNode works pretty much in the same way as NodesControl, but is more optimized. It has some drawbacks/limitations - since the object in the template is completely reused, so any heavy modifications on the object is not possible. But you should be able to change Scale, which is what you need for bars that are databound. 

Sep 24, 2010 at 2:25 PM

i tested it online and it works fine but when i use it  in  my pc   initially all 3 bar displayed but when i click on add value only newly added bar is displayed.can u suggest what would be solution?

and ya how can i convert it to 3d space not in single row.I tried to change position in Bar.xaml but could not get.

you are right i simply need scale and detect mouse enter event.


Sep 24, 2010 at 5:02 PM

I'm not sure why you're getting that problem. When you say on your PC, as a out-of-browser app, or just downloading the source and using that directly?

The way I would structure it is to have something similar as the charting controls in Silverlight Toolkit (http://timheuer.com/blog/archive/2008/10/28/silverlight-toolkit-released-with-charting-databinding.aspx) were you have Series and you can add multiple series. So something like BarSeries, and you add a series for each Z position and you specify either the Z position or you automatically calculate it. 

Each series would then be databound to a collection of data items. 

Basically, create an abstraction that uses NodesControl for each series and InstancingNodes for the bars itself. The InstancingNodes uses a template and this you provide a UserControl that you create yourself and override a property called DataItem - in the DataItem override you can change your nodes inside the UserControl, set the scale in your case, as well as the position. 

Have a look at the InstancingNodes sample for how to use that specifically. 


I'm not sure how I can explain this further - without writing the entire code.. :) 

Sep 28, 2010 at 7:34 AM

when i say my PC means.I have copy the code from (http://www.ingebrigtsen.info/Balder/SampleBrowser/TestPage.html) and  run that application in browser and still face same problem.

I got the  explanation of  NodeControl you write but still from BarChart in to able to create a 3D Grid.

I am able to create 3D(x,y,z axis) but not grid function like






Sep 29, 2010 at 6:05 PM

NodesControl is very good when you want to DataBind. There is no control in Balder that has the purpose of a grid. If you want to create that, you could have a NodesControl within a NodesControl. If you look at the HierarchicalNodesControl sample, it creates a 3D grid of a bunch of elements.