웹에서 .ICO 유형의 파일을로드하려고 시도하고 Windows 전화에서이 파일을 이미지로 사용하려고합니다. 그러나 BitmapImage의 소스를 설정하려고 할 때 오류가 발생합니다. 여기 내 코드는 다음과 같습니다.웹에서 .ico로드 및 BitmapSource로 변환
WebClient client = new WebClient();
client.OpenReadCompleted += (s, e) => {
if (e.Cancelled) return;
if (null != e.Error) throw e.Error;
BitmapImage image = new BitmapImage();
image.SetSource(e.Result);
this.Favicon = image;
};
client.OpenReadAsync(new Uri(@"http://mysite/myimage.ico", UriKind.RelativeOrAbsolute));
BitmapImage는 "ico"파일을 지원합니까? "ico"를 지원되는 BitmapImage 파일로 변환하는 방법.
이 솔루션은 PNG 및 JPG 것 같다 윈도우 폰 7
TKS BitmapImage
지원
부끄러움, 정말 지원되지 않음 (http://forums.create.msdn.com/forums/p/73618/449043.aspx#449043)이 구현은 완벽하게 작동하지 않습니다 ... www.getfavicon.org의 서비스 사용 –