How to access a control added from C# by name
<p>I have added a content Control containing a telerik Chart which i have named bob.
I have used xamlReader.parse to build the content control and then place it onto a canvas.</p>

<p>I now want to access the the chart called bob to set it's values.</p>

<pre><code>var myChart = (RadCartesianChart)this.FindName("bob");
</code></pre>

<p>I keep receiving null.</p>

<p>Could someone help me identify my chart and show me how to access it?</p>

<p>Code to add ContentControl to a canvas in my Xaml.</p>

<pre><code>StringBuilder LineCharString = new StringBuilder("&lt;ContentControl ");
LineCharString.Append("xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' ");
LineCharString.Append("xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' ");
LineCharString.Append("xmlns:s='clr-namespace:AccSys.Helpers.Dashboard;assembly=AccSys' ");
LineCharString.Append("xmlns:telerik='http://schemas.telerik.com/2008/xaml/presentation' ");
LineCharString.Append("Width='100' Height='100' MinWidth='50' MinHeight='50' Canvas.Top='160' Canvas.Left='30'&gt;");
LineCharString.Append("&lt;Grid IsHitTestVisible='False'&gt;");
LineCharString.Append("&lt;Grid.RenderTransform&gt;");
LineCharString.Append("&lt;TranslateTransform/&gt;");
LineCharString.Append("&lt;/Grid.RenderTransform&gt;");
LineCharString.Append("&lt;telerik:RadCartesianChart x:Name='" + ChartName + "'&gt;");
LineCharString.Append("&lt;telerik:RadCartesianChart.Grid&gt;");
LineCharString.Append("&lt;telerik:CartesianChartGrid MajorLinesVisibility='XY' MajorXLineDashArray='10,5' MajorXLinesRenderMode='All' /&gt;");
LineCharString.Append("&lt;/telerik:RadCartesianChart.Grid&gt;");
LineCharString.Append("&lt;telerik:RadCartesianChart.VerticalAxis&gt;");
LineCharString.Append("&lt;telerik:LinearAxis/&gt;");
LineCharString.Append("&lt;/telerik:RadCartesianChart.VerticalAxis&gt;");
LineCharString.Append("&lt;telerik:RadCartesianChart.HorizontalAxis&gt;");
LineCharString.Append("&lt;telerik:CategoricalAxis/&gt;");
LineCharString.Append("&lt;/telerik:RadCartesianChart.HorizontalAxis&gt;");
LineCharString.Append("&lt;telerik:BarSeries x:Name='xBarSeries' CategoryBinding='XValue' ValueBinding='YValue'/&gt;");
LineCharString.Append("&lt;/telerik:RadCartesianChart&gt;");
LineCharString.Append("&lt;/Grid&gt;");
LineCharString.Append("&lt;/ContentControl&gt;");

ContentControl LineChartCC = new ContentControl();
LineChartCC = (ContentControl)XamlReader.Parse(LineCharString.ToString());

var canvass = DashboardCanvas;
canvass.Children.Add(LineChartCC);
</code></pre>