You can specify a ImageBrushname:
<ImageBrush x:Name="ibPivot" ImageSource="Theme1.png" Stretch="Fill"/>
Then change the source code in the code:
BitmapImage bi = new BitmapImage(new Uri("mySecondImage.png", UriKind.Relative));
ibPivot.ImageSource = bi;
source
share