Generally speaking there are two ways you can set an image source at run time (the code samples below are in pseudo-code and would not compile):
1) In XAML using binding where the source of the binding will be some object's property containing the image source (this is the scenario Slugster was talking about):
This would be your object:
public class ViewModel
{
public string ImageURI {get;set;}
}
and will be presented by XAML where you have your button with image, and image source is set through binding:
<Image Source="{Binding Source=ViewModel; Path=ImageURI}"/>
2) By setting the image source from code-behind.
this will be your XAML where you have the button with image:
<Image x:Name="theImage"/>
and in the code-behind you set the source of that image:
theImage.Source = new BitmapImage(new Uri("yor image uri"));