此範例使用WPF建立
//括弧內第一個參數為專案名稱,分號後面為圖片路徑,這邊使用相對路徑。
Uri uriImage = new Uri("/TestGestureRecognition;component/Images/error.png", UriKind.Relative);
ImageSource imageSource = new BitmapImage(uriImage);
//resultsImage是要放置圖片的控制項,這邊使用Image
this.resultsImage.Source = imageSource;
全站熱搜