private void Grid_OnDrop(object sender, DragEventArgs e) { var fileList = e.Data.GetData(DataFormats.FileDrop) as string[]; if (fileList != null) { if (File.Exists(fileList[0])) { var file = fileList[0]; if (Path.GetExtension(file).ToLower(CultureInfo.InvariantCulture) == ".gif") { var gifImage = new GifImage(); gifImage.GifSource = new Uri(file); Grid.Children.Clear(); Grid.Children.Add(gifImage); gifImage.StartAnimation(); } } } }