You need to convert ImagePath
into property as you are cannot bind to fields
public partial class MainPage : PhoneApplicationPage
{
public string ImagePath { get; set; }
public MainPage()
{
ImagePath = "/Images/Flower.png";
InitializeComponent();
}
}
give page some name and bind Image.Source
to ImagePath
property
<phone:PhoneApplicationPage ... x:Name="myPage">
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Image x:Name="ImageShow" Source="{Binding ElementName=myPage, Path=ImagePath}"/>
</Grid>
</phone:PhoneApplicationPage>