ImageSource クラス

定義

Image.Source プロパティと ImageBrush.ImageSource プロパティのオブジェクト ソースの種類を提供します。

public ref class ImageSource : DependencyObject
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ImageSource : DependencyObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class ImageSource : DependencyObject
Public Class ImageSource
Inherits DependencyObject
継承
Object Platform::Object IInspectable DependencyObject ImageSource
派生
属性

注釈

Important

通常は ImageSource 型を直接使用したり作成したりすることはありません。そのため、このページにはコード例が表示されません。 BitmapImage を作成し、それを値として使用する方が一般的です。 コード例と詳細については、 BitmapImage のリファレンス ページを参照してください。

ImageSource と BitmapSource、BitmapImage の中間基底クラスです。 Image.Source および ImageBrush.ImageSource に使用するイメージ ソースを作成する方法の詳細については、「Image および ImageBrush および BitmapImage」を参照してください。

ImageSource 型は、Windowsに使用する値でもあります。Ui。Xaml.Controls.MediaElement.PosterSource プロパティ。

ImageSource 派生クラス

ImageSource は、 BitmapSourceRenderTargetBitmap の親クラスです。

プロパティ

名前 説明
Dispatcher

Windows アプリ SDK アプリで常に null を返します。 代わりに DispatcherQueue を使用してください。

(継承元 DependencyObject)
DispatcherQueue

このオブジェクトが関連付けられている DispatcherQueue を取得します。 DispatcherQueueは、コードが非 UI スレッドによって開始された場合でも、UI スレッド上のDependencyObjectにアクセスできる機能を表します。

(継承元 DependencyObject)

メソッド

名前 説明
ClearValue(DependencyProperty)

依存関係プロパティのローカル値をクリアします。

(継承元 DependencyObject)
GetAnimationBaseValue(DependencyProperty)

依存関係プロパティに対して確立された基本値を返します。これは、アニメーションがアクティブでない場合に適用されます。

(継承元 DependencyObject)
GetValue(DependencyProperty)

DependencyObject から依存関係プロパティの現在の有効な値を返します。

(継承元 DependencyObject)
ReadLocalValue(DependencyProperty)

ローカル値が設定されている場合は、依存関係プロパティのローカル値を返します。

(継承元 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

この DependencyObject インスタンスの特定の DependencyProperty への変更をリッスンするための通知関数を登録します。

(継承元 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject の依存関係プロパティのローカル値を設定します。

(継承元 DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

RegisterPropertyChangedCallback を呼び出して以前に登録した変更通知を取り消します。

(継承元 DependencyObject)

適用対象

こちらもご覧ください