Get BitmapSource From Image Control
<p>why the following code is returning null for btmSrc ?</p>

<pre><code>DrawingImage drawingElement =(DrawingImage)System.Windows.Application.Current.TryFindResource(name);
 System.Windows.Controls.Image image = new System.Windows.Controls.Image();
 image.Source = drawingElement as ImageSource;

BitmapSource btmSrc = image.Source as BitmapSource;
</code></pre>
