transformtovisual

Silverlight 4 - Am I using TransformToVisual() correctly?

I have just started to play around with Silverlight and I decided to do a small app in Visual Studio 2010. I am trying to find the current position of a usercontrol in a Canvas. Here is the XAML layout: <Grid x:Name="LayoutRoot" Background="#FF141313"> <Grid.RowDefinitions> <RowDefinition Height="39"/> <RowDefinition...

Control's parent is null when placed inside a ContentControl

I've got a simple control derived from ContentControl with 3 properties. My problem comes when I try to perform a control.TransformToVisual() with a control that is placed inside MainContent. It always brings up an ArgumentNullException. My guess is this due to the control having a null Parent property. Is there a simple way to way aro...