Author: Somnath Panja | Posted on: 6/8/2008 4:05:20 AM | Views : 320

How can i set The TopProperty only of a TextBlock.
Nither 
t.SetValue(Canvas.TopProperty, 80); 
NOR 
t.Margin.Top = 80; is working with silverlight beta 2.

Can you please tell me what should i do to set the TopProperty Only?
Here is my OLD code..with Silverlight 2 beta 1

 
TextBlock t = new TextBlock();
t.Text = "My Text";
t.Foreground = new SolidColorBrush(Colors.Black);      
t.SetValue(Canvas.TopProperty, 80); 

LayoutRoot.Children.Add(t);
 
Please help...

 
 
...

Go to the complete details ...