private async void Button_Click(object sender, RoutedEventArgs e) { Listjokes = await this.getFileContentAsync(); imagepoll.Orientation = Orientation.Vertical; imagepoll.Width = 800; foreach (ServiceReference1.Pic pic in jokes) { StackPanel panel = new StackPanel(); panel.Orientation = Orientation.Horizontal; ImageBrush imageBrush = new ImageBrush(); imageBrush.ImageSource = new BitmapImage(new Uri(pic.URL)); Image image = new Image(); image.Source = imageBrush.ImageSource; image.Margin = new Thickness(0, 0, 10, 0); image.Width = 100; panel.Children.Add(image); TextBlock block = new TextBlock(); block.Text = pic.Name; panel.Children.Add(block); this.imagepoll.Children.Add(panel); panel.PointerMoved += Mource_Move; } } private async void Mource_Move(object sender, RoutedEventArgs e) { StackPanel panel = (StackPanel)sender; TextBlock block = (TextBlock)panel.Children[1]; string message = block.Text; MessageDialog dialog = new MessageDialog(message); dialog.ShowAsync(); }