private void SetImageGif(Uri uri) { ClearProgress(); ClearImage(); ClearImageGif(); var imageGif = new GifControl(); imageGif.SetBinding(GifControl.StretchProperty, new Binding { Source = this, Path = new PropertyPath("Stretch") }); imageGif.SetBinding(GifControl.HorizontalAlignmentProperty, new Binding { Source = this, Path = new PropertyPath("HorizontalAlignment") }); imageGif.SetBinding(GifControl.VerticalAlignmentProperty, new Binding { Source = this, Path = new PropertyPath("VerticalAlignment") }); imageGif.SetBinding(GifControl.NineGridProperty, new Binding { Source = this, Path = new PropertyPath("NineGrid") }); imageGif.SetBinding(GifControl.AutoPlayProperty, new Binding { Source = this, Path = new PropertyPath("AnimateGif") }); imageGif.Source = uri; this.Content = imageGif; }