Hi guys,
in the file foo.xaml (the XAML file) I have something like this:
<Image x:Name="pippo"/>
in the file foo.xaml.cs (the C# file) I tried to reference the element in this way:
Image im = (Image)pippo;
I was sure that I'd get it right cause pippo's an image in the xaml file, but unfortunatly it gives an System.InvalidCastException.
Why is that?