BitmapImage BitmapImage BitmapImage BitmapImage Class

定義

使用 Extensible Application Markup Language (XAML),提供針對載入影像最佳化的特殊化 BitmapSourceProvides a specialized BitmapSource that is optimized for loading images using Extensible Application Markup Language (XAML).

public ref class BitmapImage sealed : System::Windows::Media::Imaging::BitmapSource, System::ComponentModel::ISupportInitialize, System::Windows::Markup::IUriContext
public sealed class BitmapImage : System.Windows.Media.Imaging.BitmapSource, System.ComponentModel.ISupportInitialize, System.Windows.Markup.IUriContext
type BitmapImage = class
    inherit BitmapSource
    interface ISupportInitialize
    interface IUriContext
Public NotInheritable Class BitmapImage
Inherits BitmapSource
Implements ISupportInitialize, IUriContext
繼承
實作

範例

下列程式碼範例示範如何BitmapImage在和程式碼中Extensible Application Markup Language (XAML)Extensible Application Markup Language (XAML)使用。The following code examples demonstrate how to use a BitmapImage in Extensible Application Markup Language (XAML)Extensible Application Markup Language (XAML) and code.

<!-- Property Tag XAML Syntax -->
<Image Width="200"  Margin="5" Grid.Column="1" Grid.Row="1" >
   <Image.Source>
      <BitmapImage UriSource="sampleImages/bananas.jpg" />
   </Image.Source>
</Image>
<!-- Property Tag XAML Syntax -->
<Image Width="200"  Margin="5" Grid.Column="1" Grid.Row="1" >
   <Image.Source>
      <BitmapImage UriSource="sampleImages/bananas.jpg" />
   </Image.Source>
</Image>
// Create the image element.
Image simpleImage = new Image();    
simpleImage.Width = 200;
simpleImage.Margin = new Thickness(5);

// Create source.
BitmapImage bi = new BitmapImage();
// BitmapImage.UriSource must be in a BeginInit/EndInit block.
bi.BeginInit();
bi.UriSource = new Uri(@"/sampleImages/cherries_larger.jpg",UriKind.RelativeOrAbsolute);
bi.EndInit();
// Set the image source.
simpleImage.Source = bi;
' Create the image element.
Dim simpleImage As New Image()
simpleImage.Width = 200
simpleImage.Margin = New Thickness(5)

' Create source.
Dim bi As New BitmapImage()
' BitmapImage.UriSource must be in a BeginInit/EndInit block.
bi.BeginInit()
bi.UriSource = New Uri("/sampleImages/cherries_larger.jpg", UriKind.RelativeOrAbsolute)
bi.EndInit()
' Set the image source.
simpleImage.Source = bi

備註

BitmapImage主要是為了支援Extensible Application Markup Language (XAML)Extensible Application Markup Language (XAML)語法, 並引進不是由BitmapSource定義之點陣圖載入的其他屬性。BitmapImage primarily exists to support Extensible Application Markup Language (XAML)Extensible Application Markup Language (XAML) syntax and introduces additional properties for bitmap loading that are not defined by BitmapSource.

BitmapImage會執行ISupportInitialize介面, 以優化多個屬性的初始化。BitmapImage implements the ISupportInitialize interface to optimize initialization on multiple properties. 只有在物件初始化期間,才會發生屬性變更。Property changes can only occur during object initialization. 呼叫BeginInit以表示初始化已開始, 並EndInit指出初始化已完成。Call BeginInit to signal that initialization has begun and EndInit to signal that initialization has completed. 初始化之後, 會忽略屬性變更。After initialization, property changes are ignored.

BitmapImage使用此函式BitmapImage建立的物件會自動初始化, 而屬性變更會被忽略。BitmapImage objects created using the BitmapImage constructor are automatically initialized and property changes are ignored.

建構函式

BitmapImage() BitmapImage() BitmapImage() BitmapImage()

初始化 BitmapImage 類別的新執行個體。Initializes a new instance of the BitmapImage class.

BitmapImage(Uri) BitmapImage(Uri) BitmapImage(Uri) BitmapImage(Uri)

使用所提供的 BitmapImage,初始化 Uri 類別的新執行個體。Initializes a new instance of the BitmapImage class by using the supplied Uri.

BitmapImage(Uri, RequestCachePolicy) BitmapImage(Uri, RequestCachePolicy) BitmapImage(Uri, RequestCachePolicy) BitmapImage(Uri, RequestCachePolicy)

使用來源為 BitmapImage,而且根據提供之 Uri 快取的影像,初始化 RequestCachePolicy 類別的新執行個體。Initializes a new instance of the BitmapImage class with an image whose source is a Uri, and is cached according to the provided RequestCachePolicy.

欄位

CacheOptionProperty CacheOptionProperty CacheOptionProperty CacheOptionProperty

識別 CacheOption 相依性屬性。Identifies the CacheOption dependency property.

CreateOptionsProperty CreateOptionsProperty CreateOptionsProperty CreateOptionsProperty

識別 CreateOptions 相依性屬性。Identifies the CreateOptions dependency property.

DecodePixelHeightProperty DecodePixelHeightProperty DecodePixelHeightProperty DecodePixelHeightProperty

識別 DecodePixelHeight 相依性屬性。Identifies the DecodePixelHeight dependency property.

DecodePixelWidthProperty DecodePixelWidthProperty DecodePixelWidthProperty DecodePixelWidthProperty

識別 DecodePixelWidth 相依性屬性。Identifies the DecodePixelWidth dependency property.

RotationProperty RotationProperty RotationProperty RotationProperty

識別 Rotation 相依性屬性。Identifies the Rotation dependency property.

SourceRectProperty SourceRectProperty SourceRectProperty SourceRectProperty

識別 SourceRect 相依性屬性。Identifies the SourceRect dependency property.

StreamSourceProperty StreamSourceProperty StreamSourceProperty StreamSourceProperty

識別 StreamSource 相依性屬性。Identifies the StreamSource dependency property.

UriCachePolicyProperty UriCachePolicyProperty UriCachePolicyProperty UriCachePolicyProperty

識別 UriCachePolicy 相依性屬性。Identifies the UriCachePolicy dependency property.

UriSourceProperty UriSourceProperty UriSourceProperty UriSourceProperty

識別 UriSource 相依性屬性。Identifies the UriSource dependency property.

屬性

BaseUri BaseUri BaseUri BaseUri

取得或設定值,這個值表示目前 Uri 內容的基底 BitmapImageGets or sets a value that represents the base Uri of the current BitmapImage context.

CacheOption CacheOption CacheOption CacheOption

取得或設定要用於這個 BitmapCacheOption 執行個體的 BitmapImageGets or sets the BitmapCacheOption to use for this instance of BitmapImage.

CanFreeze CanFreeze CanFreeze CanFreeze

取得值,指出是否可以將物件設為不可修改。Gets a value that indicates whether the object can be made unmodifiable.

(Inherited from Freezable)
CreateOptions CreateOptions CreateOptions CreateOptions

取得或設定 BitmapCreateOptionsBitmapImageGets or sets the BitmapCreateOptions for a BitmapImage.

DecodePixelHeight DecodePixelHeight DecodePixelHeight DecodePixelHeight

取得或設定影像解碼成的高度 (以像素為單位)。Gets or sets the height, in pixels, that the image is decoded to.

DecodePixelWidth DecodePixelWidth DecodePixelWidth DecodePixelWidth

取得或設定影像解碼成的寬度 (以像素為單位)。Gets or sets the width, in pixels, that the image is decoded to.

DependencyObjectType DependencyObjectType DependencyObjectType DependencyObjectType

取得包裝此執行個體之 CLRCLR 型別的 DependencyObjectTypeGets the DependencyObjectType that wraps the CLRCLR type of this instance.

(Inherited from DependencyObject)
Dispatcher Dispatcher Dispatcher Dispatcher

取得與這個 Dispatcher 關聯的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(Inherited from DispatcherObject)
DpiX DpiX DpiX DpiX

取得影像的水平 DPI (每英吋的點數)dots per inch (dpi)Gets the horizontal DPI (每英吋的點數)dots per inch (dpi) of the image.

(Inherited from BitmapSource)
DpiY DpiY DpiY DpiY

取得影像的垂直 DPI (每英吋的點數)dots per inch (dpi)Gets the vertical DPI (每英吋的點數)dots per inch (dpi) of the image.

(Inherited from BitmapSource)
Format Format Format Format

取得點陣圖資料的原生 PixelFormatGets the native PixelFormat of the bitmap data.

(Inherited from BitmapSource)
HasAnimatedProperties HasAnimatedProperties HasAnimatedProperties HasAnimatedProperties

取得值,這個值表示是否有一個或多個 AnimationClock 物件與這個物件的任何一個相依性屬性相關聯。Gets a value that indicates whether one or more AnimationClock objects is associated with any of this object's dependency properties.

(Inherited from Animatable)
Height Height Height Height

取得來源點陣圖的高度,裝置獨立單位 (每單位 1/96 英吋)device-independent units (1/96th inch per unit)Gets the height of the source bitmap in 裝置獨立單位 (每單位 1/96 英吋)device-independent units (1/96th inch per unit).

(Inherited from BitmapSource)
IsDownloading IsDownloading IsDownloading IsDownloading

取得值,這個值表示 BitmapImage 目前是否正在下載內容。Gets a value that indicates whether the BitmapImage is currently downloading content.

IsFrozen IsFrozen IsFrozen IsFrozen

取得值,該值表示物件目前是否可修改。Gets a value that indicates whether the object is currently modifiable.

(Inherited from Freezable)
IsSealed IsSealed IsSealed IsSealed

取得值,這個值表示此執行個體目前是否已密封 (唯讀)。Gets a value that indicates whether this instance is currently sealed (read-only).

(Inherited from DependencyObject)
Metadata Metadata Metadata Metadata

不支援。Not supported. BitmapImage 不支援 Metadata 屬性,並且會擲回 NotSupportedExceptionBitmapImage does not support the Metadata property and will throw a NotSupportedException.

Palette Palette Palette Palette

取得點陣圖的色板 (如果有指定的話)。Gets the color palette of the bitmap, if one is specified.

(Inherited from BitmapSource)
PixelHeight PixelHeight PixelHeight PixelHeight

取得點陣圖的高度 (以像素為單位)。Gets the height of the bitmap in pixels.

(Inherited from BitmapSource)
PixelWidth PixelWidth PixelWidth PixelWidth

取得點陣圖的寬度 (以像素為單位)。Gets the width of the bitmap in pixels.

(Inherited from BitmapSource)
Rotation Rotation Rotation Rotation

取得或設定這個 BitmapImage 會旋轉的角度。Gets or sets the angle that this BitmapImage is rotated to.

SourceRect SourceRect SourceRect SourceRect

取得或設定當成 BitmapImage 之來源的矩形。Gets or sets the rectangle that is used as the source of the BitmapImage.

StreamSource StreamSource StreamSource StreamSource

取得或設定 BitmapImage 的資料流來源。Gets or sets the stream source of the BitmapImage.

UriCachePolicy UriCachePolicy UriCachePolicy UriCachePolicy

取得或設定值,這個值表示來自 HTTP 來源之影像的快取原則。Gets or sets a value that represents the caching policy for images that come from an HTTP source.

UriSource UriSource UriSource UriSource

取得或設定 UriBitmapImage 來源。Gets or sets the Uri source of the BitmapImage.

Width Width Width Width

取得點陣圖的寬度,裝置獨立單位 (每單位 1/96 英吋)device-independent units (1/96th inch per unit)Gets the width of the bitmap in 裝置獨立單位 (每單位 1/96 英吋)device-independent units (1/96th inch per unit).

(Inherited from BitmapSource)

方法

ApplyAnimationClock(DependencyProperty, AnimationClock) ApplyAnimationClock(DependencyProperty, AnimationClock) ApplyAnimationClock(DependencyProperty, AnimationClock) ApplyAnimationClock(DependencyProperty, AnimationClock)

AnimationClock 套用至指定的 DependencyPropertyApplies an AnimationClock to the specified DependencyProperty. 如果屬性已有動畫效果,即使用 SnapshotAndReplace 遞移式行為。If the property is already animated, the SnapshotAndReplace handoff behavior is used.

(Inherited from Animatable)
ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior) ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior) ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior) ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior)

AnimationClock 套用至指定的 DependencyPropertyApplies an AnimationClock to the specified DependencyProperty. 如果已建立屬性的動畫,則會使用指定的 HandoffBehaviorIf the property is already animated, the specified HandoffBehavior is used.

(Inherited from Animatable)
BeginAnimation(DependencyProperty, AnimationTimeline) BeginAnimation(DependencyProperty, AnimationTimeline) BeginAnimation(DependencyProperty, AnimationTimeline) BeginAnimation(DependencyProperty, AnimationTimeline)

將動畫套用至指定的 DependencyPropertyApplies an animation to the specified DependencyProperty. 呈現下一個畫面格後,就會啟動動畫。The animation is started when the next frame is rendered. 如果指定的屬性已有動畫效果,即使用 SnapshotAndReplace 遞移式行為。If the specified property is already animated, the SnapshotAndReplace handoff behavior is used.

(Inherited from Animatable)
BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior) BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior) BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior) BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior)

將動畫套用至指定的 DependencyPropertyApplies an animation to the specified DependencyProperty. 呈現下一個畫面格後,就會啟動動畫。The animation is started when the next frame is rendered. 如果已建立指定之屬性的動畫,則會使用指定的 HandoffBehaviorIf the specified property is already animated, the specified HandoffBehavior is used.

(Inherited from Animatable)
BeginInit() BeginInit() BeginInit() BeginInit()

表示 BitmapImage 初始化開始。Signals the start of the BitmapImage initialization.

CheckAccess() CheckAccess() CheckAccess() CheckAccess()

判斷呼叫的執行是否可以存取這個 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
CheckIfSiteOfOrigin() CheckIfSiteOfOrigin() CheckIfSiteOfOrigin() CheckIfSiteOfOrigin()

檢查點陣圖來源內容是否來自已知的來源網站。Checks whether the bitmap source content is from a known site of origin. 這個方法可用來確定像素複製作業是安全的。This method is used to make sure that pixel copying operations are safe.

(Inherited from BitmapSource)
ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

清除屬性的區域數值。Clears the local value of a property. 要清除的屬性是由 DependencyProperty 識別項所指定。The property to be cleared is specified by a DependencyProperty identifier.

(Inherited from DependencyObject)
ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey) ClearValue(DependencyPropertyKey)

清除唯讀屬性的區域數值。Clears the local value of a read-only property. 要清除的屬性是由 DependencyPropertyKey 所指定。The property to be cleared is specified by a DependencyPropertyKey.

(Inherited from DependencyObject)
Clone() Clone() Clone() Clone()

建立這個 BitmapImage 的可修改複製品,深層複製這個物件的值。Creates a modifiable clone of this BitmapImage, making deep copies of this object's values.

CloneCore(Freezable) CloneCore(Freezable) CloneCore(Freezable) CloneCore(Freezable)

使這個執行個體成為指定之 BitmapSource 的深層複本。Makes this instance a deep copy of the specified BitmapSource. 當複製相依性屬性時,這個方法會複製資源參考和資料繫結 (但可能無法再解析),但不會複製動畫或它們目前的值。When copying dependency properties, this method copies resource references and data bindings (but they might no longer resolve) but not animations or their current values.

(Inherited from BitmapSource)
CloneCurrentValue() CloneCurrentValue() CloneCurrentValue() CloneCurrentValue()

建立這個 BitmapImage 物件的可修改複製品,製作這個物件目前值的深層複本。Creates a modifiable clone of this BitmapImage object, making deep copies of this object's current values. 不會複製資源參考、資料繫結和動畫,但是會複製其目前值。Resource references, data bindings, and animations are not copied, but their current values are.

CloneCurrentValueCore(Freezable) CloneCurrentValueCore(Freezable) CloneCurrentValueCore(Freezable) CloneCurrentValueCore(Freezable)

使用目前的屬性值,讓這個執行個體成為指定之 BitmapSource 的可修改深層複本。Makes this instance a modifiable deep copy of the specified BitmapSource using current property values. 不會複製資源參考、資料繫結和動畫,但是會複製其目前值。Resource references, data bindings, and animations are not copied, but their current values are.

(Inherited from BitmapSource)
CoerceValue(DependencyProperty) CoerceValue(DependencyProperty) CoerceValue(DependencyProperty) CoerceValue(DependencyProperty)

強制轉型所指定相依性屬性的值。Coerces the value of the specified dependency property. 叫用存在於呼叫 CoerceValueCallback 上相依性屬性之屬性中繼資料內所指定的任何 DependencyObject 函式,就可以達到這一點。This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.

(Inherited from DependencyObject)
CopyPixels(Array, Int32, Int32) CopyPixels(Array, Int32, Int32) CopyPixels(Array, Int32, Int32) CopyPixels(Array, Int32, Int32)

將點陣圖像素資料複製到具有所指定步距 的像素陣列 (從指定的位移 (Offset) 開始)。Copies the bitmap pixel data into an array of pixels with the specified stride, starting at the specified offset.

(Inherited from BitmapSource)
CopyPixels(Int32Rect, Array, Int32, Int32) CopyPixels(Int32Rect, Array, Int32, Int32) CopyPixels(Int32Rect, Array, Int32, Int32) CopyPixels(Int32Rect, Array, Int32, Int32)

將指定之矩形內的點陣圖像素資料,複製到具有所指定步距的像素陣列 (從指定的位移開始)。Copies the bitmap pixel data within the specified rectangle into an array of pixels that has the specified stride starting at the specified offset.

(Inherited from BitmapSource)
CopyPixels(Int32Rect, IntPtr, Int32, Int32) CopyPixels(Int32Rect, IntPtr, Int32, Int32) CopyPixels(Int32Rect, IntPtr, Int32, Int32) CopyPixels(Int32Rect, IntPtr, Int32, Int32)

複製指定之矩形內的點陣圖像素資料。Copies the bitmap pixel data within the specified rectangle

(Inherited from BitmapSource)
CreateInstance() CreateInstance() CreateInstance() CreateInstance()

初始化 Freezable 類別的新執行個體。Initializes a new instance of the Freezable class.

(Inherited from Freezable)
CreateInstanceCore() CreateInstanceCore() CreateInstanceCore() CreateInstanceCore()

在衍生類別中實作時,建立 Freezable 衍生類別的新執行個體。When implemented in a derived class, creates a new instance of the Freezable derived class.

(Inherited from Freezable)
EndInit() EndInit() EndInit() EndInit()

表示 BitmapImage 初始化結束。Signals the end of the BitmapImage initialization.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷提供的 DependencyObject 和目前的 DependencyObject 是否相等。Determines whether a provided DependencyObject is equivalent to the current DependencyObject.

(Inherited from DependencyObject)
Freeze() Freeze() Freeze() Freeze()

將目前的物件設為不可修改,並將其 IsFrozen 屬性設定為 trueMakes the current object unmodifiable and sets its IsFrozen property to true.

(Inherited from Freezable)
FreezeCore(Boolean) FreezeCore(Boolean) FreezeCore(Boolean) FreezeCore(Boolean)

BitmapSource 的執行個體或衍生類別製作為不變的。Makes an instance of BitmapSource or a derived class immutable.

(Inherited from BitmapSource)
GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty)

傳回指定之 DependencyProperty 的非動畫實值。Returns the non-animated value of the specified DependencyProperty.

(Inherited from Animatable)
GetAsFrozen() GetAsFrozen() GetAsFrozen() GetAsFrozen()

使用基底 (非動畫) 屬性值,建立 Freezable 的凍結複本。Creates a frozen copy of the Freezable, using base (non-animated) property values. 因為複本已凍結,所以會以傳址方式複製任何凍結子物件。Because the copy is frozen, any frozen sub-objects are copied by reference.

(Inherited from Freezable)
GetAsFrozenCore(Freezable) GetAsFrozenCore(Freezable) GetAsFrozenCore(Freezable) GetAsFrozenCore(Freezable)

使這個執行個體成為指定之 BitmapSource 物件的複製。Makes this instance a clone of the specified BitmapSource object.

(Inherited from BitmapSource)
GetCurrentValueAsFrozen() GetCurrentValueAsFrozen() GetCurrentValueAsFrozen() GetCurrentValueAsFrozen()

使用目前屬性值,建立 Freezable 的凍結複本。Creates a frozen copy of the Freezable using current property values. 因為複本已凍結,所以會以傳址方式複製任何凍結子物件。Because the copy is frozen, any frozen sub-objects are copied by reference.

(Inherited from Freezable)
GetCurrentValueAsFrozenCore(Freezable) GetCurrentValueAsFrozenCore(Freezable) GetCurrentValueAsFrozenCore(Freezable) GetCurrentValueAsFrozenCore(Freezable)

使這個執行個體成為所指定 BitmapSource 的凍結複製品。Makes this instance a frozen clone of the specified BitmapSource. 不會複製資源參考、資料繫結和動畫,但是會複製其目前值。Resource references, data bindings, and animations are not copied, but their current values are.

(Inherited from BitmapSource)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

取得這個 DependencyObject 的雜湊程式碼。Gets a hash code for this DependencyObject.

(Inherited from DependencyObject)
GetLocalValueEnumerator() GetLocalValueEnumerator() GetLocalValueEnumerator() GetLocalValueEnumerator()

建立特定的列舉值,以判斷哪些相依性屬性在此 DependencyObject 上具有本機設定的值。Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.

(Inherited from DependencyObject)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

傳回 DependencyObject 的這個執行個體上之相依性屬性的目前有效值。Returns the current effective value of a dependency property on this instance of a DependencyObject.

(Inherited from DependencyObject)
InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty) InvalidateProperty(DependencyProperty)

重新評估指定之相依性屬性的有效值。Re-evaluates the effective value for the specified dependency property

(Inherited from DependencyObject)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
OnChanged() OnChanged() OnChanged() OnChanged()

目前的 Freezable 物件遭到修改時進行呼叫。Called when the current Freezable object is modified.

(Inherited from Freezable)
OnFreezablePropertyChanged(DependencyObject, DependencyObject) OnFreezablePropertyChanged(DependencyObject, DependencyObject) OnFreezablePropertyChanged(DependencyObject, DependencyObject) OnFreezablePropertyChanged(DependencyObject, DependencyObject)

確定已為剛剛設定的 DependencyObjectType 資料成員,建立適當的內容指標。Ensures that appropriate context pointers are established for a DependencyObjectType data member that has just been set.

(Inherited from Freezable)
OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty) OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty)

這個成員支援 Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) 基礎結構,但是您不可以從程式碼直接使用它。This member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

(Inherited from Freezable)
OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs) OnPropertyChanged(DependencyPropertyChangedEventArgs)

覆寫 OnPropertyChanged(DependencyPropertyChangedEventArgs)DependencyObject 實作也可以叫用任何 Changed 處理常式,以回應類型 Freezable 的變更相依性屬性。Overrides the DependencyObject implementation of OnPropertyChanged(DependencyPropertyChangedEventArgs) to also invoke any Changed handlers in response to a changing dependency property of type Freezable.

(Inherited from Freezable)
ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

傳回相依性屬性的區域值 (如果存在)。Returns the local value of a dependency property, if it exists.

(Inherited from DependencyObject)
ReadPreamble() ReadPreamble() ReadPreamble() ReadPreamble()

確定 Freezable 是從有效的執行緒進行存取。Ensures that the Freezable is being accessed from a valid thread. 如果 API 會讀取非相依性屬性的資料成員,則 Freezable 的繼承者必須在該 API 的開頭呼叫這個方法。Inheritors of Freezable must call this method at the beginning of any API that reads data members that are not dependency properties.

(Inherited from Freezable)
SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object) SetCurrentValue(DependencyProperty, Object)

設定相依性屬性的值,而不需要變更其值來源。Sets the value of a dependency property without changing its value source.

(Inherited from DependencyObject)
SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object) SetValue(DependencyProperty, Object)

設定相依性屬性的區域值 (由相依性屬性的識別碼所指定)。Sets the local value of a dependency property, specified by its dependency property identifier.

(Inherited from DependencyObject)
SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object) SetValue(DependencyPropertyKey, Object)

設定唯讀相依性屬性的區域數值 (由相依性屬性的 DependencyPropertyKey 識別項所指定)。Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.

(Inherited from DependencyObject)
ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty) ShouldSerializeProperty(DependencyProperty)

傳回值,這個值表示序列化程序是否應該序列化所提供相依性屬性的值。Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.

(Inherited from DependencyObject)
ToString() ToString() ToString() ToString()

根據目前的文化特性,建立這個物件的字串表示。Creates a string representation of this object based on the current culture.

(Inherited from ImageSource)
ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider) ToString(IFormatProvider)

根據傳入的 IFormatProvider,建立這個物件的字串表示。Creates a string representation of this object based on the IFormatProvider passed in. 如果提供者為 null,則會使用 CurrentCultureIf the provider is null, the CurrentCulture is used.

(Inherited from ImageSource)
VerifyAccess() VerifyAccess() VerifyAccess() VerifyAccess()

請強制執行可以存取這個 DispatcherObject 的呼叫執行緒。Enforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
WritePostscript() WritePostscript() WritePostscript() WritePostscript()

引發 FreezableChanged 事件,並叫用其 OnChanged() 方法。Raises the Changed event for the Freezable and invokes its OnChanged() method. 在任何 API 修改未以相依性屬性儲存的類別成員之後,衍生自 Freezable 的類別應該在 API 的結尾呼叫這個方法。Classes that derive from Freezable should call this method at the end of any API that modifies class members that are not stored as dependency properties.

(Inherited from Freezable)
WritePreamble() WritePreamble() WritePreamble() WritePreamble()

確認 Freezable 未凍結,而且是從有效的執行緒內容進行存取。Verifies that the Freezable is not frozen and that it is being accessed from a valid threading context. 在任何 API 將資料寫入至非相依性屬性的資料成員之前,Freezable 繼承者應該在 API 的開頭呼叫這個方法。Freezable inheritors should call this method at the beginning of any API that writes to data members that are not dependency properties.

(Inherited from Freezable)

事件

Changed Changed Changed Changed

發生於 Freezable 或所含的物件遭到修改時。Occurs when the Freezable or an object it contains is modified.

(Inherited from Freezable)
DecodeFailed DecodeFailed DecodeFailed DecodeFailed

當影像因影像標頭損毀而無法載入時發生。Occurs when the image fails to load, due to a corrupt image header.

(Inherited from BitmapSource)
DownloadCompleted DownloadCompleted DownloadCompleted DownloadCompleted

點陣圖內容下載完成時發生。Occurs when the bitmap content has been completely downloaded.

(Inherited from BitmapSource)
DownloadFailed DownloadFailed DownloadFailed DownloadFailed

無法下載點陣圖內容時發生。Occurs when the bitmap content failed to download.

(Inherited from BitmapSource)
DownloadProgress DownloadProgress DownloadProgress DownloadProgress

點陣圖內容的下載進度變更時發生。Occurs when the download progress of the bitmap content has changed.

(Inherited from BitmapSource)

明確介面實作

IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider) IFormattable.ToString(String, IFormatProvider)

使用指定的格式,格式化目前執行個體的值。Formats the value of the current instance using the specified format.

(Inherited from ImageSource)

適用於

另請參閱