BitmapImage.IsDownloading プロパティ

定義

BitmapImage が現在コンテンツをダウンロードしているかどうかを示す値を取得します。

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

プロパティ値

Boolean

BitmapImage がコンテンツをダウンロードしている場合は true。それ以外の場合は false

次のコード例は、コードを使用してプロパティの値を確認する方法を IsDownloading 示しています。 プロパティの値は、a としてString出力されますMessageBox

// 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)

適用対象