The other answer is valid but doesn't produce a BitmapSource.
The correct answer, given that I have a folder called Images and inside an Image with the Build Action set to Resource, is to use a Resource File Pack URI:
_myIcon = new BitmapImage(new Uri("pack://application:,,,/Images/MyImage.png");