Share via


ImageSource Classe

Definizione

Fornisce un tipo di origine oggetto per le proprietà Image.Source e 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
Ereditarietà
Object Platform::Object IInspectable DependencyObject ImageSource
Derivato
Attributi

Commenti

Importante

In genere non si usa o si crea un tipo ImageSource direttamente, questo è il motivo per cui non vengono visualizzati esempi di codice in questa pagina. È più comune creare un'immagine BitmapImage e usarla come valore. Per esempi di codice e altre informazioni, vedere la pagina di riferimento per BitmapImage.

ImageSource e BitmapSource sono classi di base intermedie per BitmapImage. Per altre informazioni su come creare un'origine immagine da usare per Image.Source e ImageBrush.ImageSource, vedere Image e ImageBrush e BitmapImage.

Il tipo ImageSource è anche il valore da usare per la proprietà Windows.UI.Xaml.Controls.MediaElement.PosterSource .

Classi derivate di ImageSource

ImageSource è la classe padre per BitmapSource e RenderTargetBitmap.

Proprietà

Dispatcher

Restituisce null sempre in un'app SDK per app di Windows. Usare invece DispatcherQueue .

(Ereditato da DependencyObject)
DispatcherQueue

Ottiene l'oggetto DispatcherQueue associato. Rappresenta DispatcherQueue una struttura che può accedere al thread dell'interfaccia utente anche se il codice viene avviato da un thread non dell'interfaccia DependencyObject utente.

(Ereditato da DependencyObject)

Metodi

ClearValue(DependencyProperty)

Cancella il valore locale di una proprietà di dipendenza.

(Ereditato da DependencyObject)
GetAnimationBaseValue(DependencyProperty)

Restituisce qualsiasi valore di base stabilito per una proprietà di dipendenza, che si applica nei casi in cui un'animazione non è attiva.

(Ereditato da DependencyObject)
GetValue(DependencyProperty)

Restituisce il valore effettivo corrente di una proprietà di dipendenza da un oggetto DependencyObject.

(Ereditato da DependencyObject)
ReadLocalValue(DependencyProperty)

Restituisce il valore locale di una proprietà di dipendenza, se viene impostato un valore locale.

(Ereditato da DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Registra una funzione di notifica per l'ascolto delle modifiche a un'istanza di DependencyObject specifica.

(Ereditato da DependencyObject)
SetValue(DependencyProperty, Object)

Imposta il valore locale di una proprietà di dipendenza in un oggetto DependencyObject.

(Ereditato da DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Annulla una notifica di modifica registrata in precedenza chiamando RegisterPropertyChangedCallback.

(Ereditato da DependencyObject)

Si applica a

Vedi anche