Hello, this is a known issue in the current alpha bits, and has been fixed in Silverlight 2.0 Beta (but may be will introduce some break changes). In the current bits, BrowserHost.ActualWidth/Height will return 0 in the Loaded event. If you want to work around this issue now, you can try this:
Dim screenWidth As Integer = (HtmlPage.Document.DocumentElement.GetProperty(Of Integer)("clientWidth"))
Dim screenHeight As Integer = (HtmlPage.Document.DocumentElement.GetProperty(Of Integer)("clientHeight"))
txtLoading.SetValue(Canvas.LeftProperty, ((screenWidth - test.ActualWidth) / 2))
txtLoading.SetValue(Canvas.TopProperty, ((screenHeight - test.ActualHeight) / 2))
You’ll probably want to wrap these code into a method, because you need to call it both in Loaded and Resize.
But I suggest you to wait for Silverlight 2.0 Beta, because there’s likely to be some break changes. Sorry I can’t provide you with more details at this time…
shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.