BitmapImage.IsDownloading Propiedad

Definición

Obtiene un valor que indica si BitmapImage está descargando contenido actualmente.

public:
 virtual property bool IsDownloading { bool get(); };
public override bool IsDownloading { get; }
member this.IsDownloading : bool
Public Overrides ReadOnly Property IsDownloading As Boolean

Valor de propiedad

Boolean

Es true si la clase BitmapImage está descargando contenido; de lo contrario, es false.

Ejemplos

En el ejemplo de código siguiente se muestra cómo comprobar el valor de la IsDownloading propiedad mediante código. El valor de la propiedad se emite a MessageBox como .String

// Define a BitmapImage.
Image myImage = new Image();
BitmapImage bi = new BitmapImage();

// Begin initialization.
bi.BeginInit();

// Set properties.
bi.CacheOption = BitmapCacheOption.OnDemand;
bi.CreateOptions = BitmapCreateOptions.DelayCreation;
bi.DecodePixelHeight = 125;
bi.DecodePixelWidth = 125;
bi.Rotation = Rotation.Rotate90;
MessageBox.Show(bi.IsDownloading.ToString());
bi.UriSource = new Uri("smiley.png", UriKind.Relative);

// End initialization.
bi.EndInit();
myImage.Source = bi;
myImage.Stretch = Stretch.None;
myImage.Margin = new Thickness(5);
' Define a BitmapImage.
Dim myImage As New Image()
Dim bi As New BitmapImage()

' Begin initialization.
bi.BeginInit()

' Set properties.
bi.CacheOption = BitmapCacheOption.OnDemand
bi.CreateOptions = BitmapCreateOptions.DelayCreation
bi.DecodePixelHeight = 125
bi.DecodePixelWidth = 125
bi.Rotation = Rotation.Rotate90
MessageBox.Show(bi.IsDownloading.ToString())
bi.UriSource = New Uri("smiley.png", UriKind.Relative)

' End initialization.
bi.EndInit()
myImage.Source = bi
myImage.Stretch = Stretch.None
myImage.Margin = New Thickness(5)

Se aplica a