Compartilhar via


BitmapImage.IsDownloading Propriedade

Definição

Obtém um valor que indica se o BitmapImage está fazendo o download do conteúdo no momento.

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

Valor da propriedade

Boolean

true se o BitmapImage conteúdo estiver baixando; caso contrário, false.

Exemplos

O exemplo de código a seguir demonstra como verificar o valor da propriedade usando o IsDownloading código. O valor da propriedade é emitido para um MessageBox como um 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)

Aplica-se a