For the first question:The control inside your map tip is null because it only part of the template.Let's try the following SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureLayerMapTipsFeatureLayer.MapTip was defined in XAML (I simply added the code in red):
<Border CornerRadius="10" BorderBrush="#FF222957" BorderThickness="3" Margin="0,0,15,15">
<Border.Background>
<LinearGradientBrush EndPoint="1.038,1.136" StartPoint="0.015,0.188">
<GradientStop Color="#FFD1DFF2"/>
<GradientStop Color="#FF0088FF" Offset="0.946"/>
</LinearGradientBrush>
</Border.Background>
<Border.Effect>
<DropShadowEffect ShadowDepth="10" BlurRadius="14" Direction="300" />
</Border.Effect>
<StackPanel Margin="7">
<TextBlock x:Name="MyCityName" Loaded="TextBlock_Loaded" Text="{Binding [CITY_NAME]}" FontWeight="Bold" Foreground="Black" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="Population: " Foreground="Black" />
<TextBlock Text="{Binding [POP1990]}" Foreground="Black" />
</StackPanel>
</StackPanel>
</Border>
I can think of two ways you can access the in code. Since you know the template, you can cast the elements until you get to the control of interest or simply add a Loaded event on the control.
{
InitializeComponent();
FeatureLayer layer = this.MyMap.Layers["CitiesFeatureLayer"] as FeatureLayer;
var mapTip = layer.MapTip;
if (this.MyCityName == null)
{
var name = (((mapTip as Border).Child as StackPanel).Children[0] as TextBlock).Name;
System.Diagnostics.Debug.WriteLine("This is one way of accessing this control '{0}'", name);
}
}
private void TextBlock_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
TextBlock tb = sender as TextBlock;
if (this.MyCityName == null)
System.Diagnostics.Debug.WriteLine("Another way of accessing this control '{0}'", tb.Name);
}
For the second question:This is by design. If URL should change, you need to replace the FeatureLayer with a new instance.