// img 에 출력하기.
protected override void OnManipulationStarted(ManipulationStartedEventArgs e)
{
WebClient webClient = new WebClient();
webClient.OpenReadCompleted += new OpenReadCompletedEventHandler(webClient_OpenReadCompleted);
webClient.OpenReadAsync(new Uri("http://www.charlespetzold.com/Media/HelloWp7.jpg"));
e.Complete();
e.Handled = true;
base.OnManipulationStarted(e);
}
void webClient_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
{
if (!e.Cancelled && e.Error == null)
{
BitmapImage bmp = new BitmapImage();
bmp.SetSource(e.Result);
img.Source = bmp;
}
}
'WINDOWS PHONE' 카테고리의 다른 글
문자열을 열거형으로 형변환 함수. (0) | 2012.11.23 |
---|---|
Windows Phone용 Silverlight 응용프로그램의 시험판 환경 구현 링크 (0) | 2012.10.17 |
웹에 있는 이미지 출력하기 예제. (0) | 2012.10.11 |
DispatcherTimer 예제 (0) | 2012.10.08 |
시스템 트레이에 프로그래스바 나타내기. (0) | 2012.10.04 |