This is how I did:
Button button2 = new Button();
BitmapImage btm = new BitmapImage(new Uri("/LoadImages;component/Images/Bear.bmp", UriKind.Relative));
Image img = new Image();
img.Source = btm;
img.Stretch = Stretch.Fill;
button2.Content = img;
button2.Height = 35;
button2.Width = 100;
stackpanel1.Children.Add(button2);
Hope it will work for you too.
:thumbsup: