Cannot implicitly convert type 'System.Windows.Controls.Image' to 'System.Drawing.Image'
private void button4_Click(object sender, EventArgs e){ GimageSearchClient client = new GimageSearchClient("http://www.google.com"); IList<IImageResult> results; IAsyncResult result = client.BeginSearch( textBox1.Text.Trim(), //param1 10, //param2 ((arResult) => //param3 { results = client.EndSearch(arResult); Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Send, (Action<IList<IImageResult>>)(async (data) => { Random r = new Random(); Image img = new Image { Source = await DownloadImage(results[r.Next(results.Count)].TbImage.Url), Stretch = Stretch.UniformToFill, StretchDirection = StretchDirection.DownOnly, }; //////// img add to Picturebox HOW ? }), null); }), null //param4 ); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)