Build Action이란?
- None : 실행 파일 또는 DLL에 포함되지 않음
- Embedded Resource : DLL에 포함됨, GetManifestResourceStream으로 불러옴
- Resource : DLL에 포함됨, URI를 통해 불러옴
예시
//상대경로
var uriSource = new Uri(@"/WpfApp1;component/Resources/dog.jpg", UriKind.Relative); //WpfApp1은 프로젝트명
ImageBox1.Source = new BitmapImage(uriSource);
//절대경로
Uri uriCatImage = new Uri(@"pack://application:,,,/Resources/cat.jpg", UriKind.Absolute);
Button1.Background = new ImageBrush(new BitmapImage(uriCatImage));