C# Класс Microsoft.DwayneNeed.Media.Imaging.ChainedBitmap

The ChainedBitmap class is the base class for custom bitmaps that processes the content of another source.
The default implementation of the BitmapSource virtuals is to delegate to the source. This makes sense for most properties like DpiX, DpiY, PixelWidth, PixelHeight, etc, as in many scenarios these properties are the same for the entire chain of bitmap sources. However, derived classes should pay special attention to the Format property. Many bitmap processors only support a limited number of pixel formats, and they should return this for the Format property. ChainedBitmap will take care of converting the pixel format as needed in the base implementation of CopyPixels.
Наследование: CustomBitmap
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
SourceProperty System.Windows.DependencyProperty

Защищенные методы

Метод Описание
CopyCore ( CustomBitmap original, bool useCurrentValue, bool willBeFrozen ) : void

Copies data into a cloned instance.

Override this method if you have additional non-DP state that should be transfered to clones.

CopyPixelsCore ( System.Windows.Int32Rect sourceRect, int stride, int bufferSize, IntPtr buffer ) : void

Requests pixels from the ChainedCustomBitmapSource.

This implementation simply delegates to the source, if present.

CreateInstanceCore ( ) : System.Windows.Freezable

Creates an instance of the ChainedBitmap class.

FreezeCore ( bool isChecking ) : bool

Transitions this instance into a thread-safe, read-only mode.

Override this method if you have additional non-DP state that should be frozen along with the instance.

OnSourcePropertyChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void

Приватные методы

Метод Описание
OnSourceDecodeFailed ( object sender, ExceptionEventArgs e ) : void
OnSourceDownloadCompleted ( object sender, EventArgs e ) : void
OnSourceDownloadFailed ( object sender, ExceptionEventArgs e ) : void
OnSourceDownloadProgress ( object sender, System.Windows.Media.Imaging.DownloadProgressEventArgs e ) : void
OnSourcePropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Описание методов

CopyCore() защищенный Метод

Copies data into a cloned instance.
Override this method if you have additional non-DP state that should be transfered to clones.
protected CopyCore ( CustomBitmap original, bool useCurrentValue, bool willBeFrozen ) : void
original CustomBitmap /// The original instance to copy data from. ///
useCurrentValue bool /// Whether or not to copy the current value of expressions, or the /// expressions themselves. ///
willBeFrozen bool /// Indicates whether or not the clone will be frozen. If the /// clone will be immediately frozen, there is no need to clone /// data that is already frozen, you can just share the instance. ///
Результат void

CopyPixelsCore() защищенный Метод

Requests pixels from the ChainedCustomBitmapSource.
This implementation simply delegates to the source, if present.
protected CopyPixelsCore ( System.Windows.Int32Rect sourceRect, int stride, int bufferSize, IntPtr buffer ) : void
sourceRect System.Windows.Int32Rect /// The rectangle of pixels being requested. ///
stride int /// The stride of the destination buffer. ///
bufferSize int /// The size of the destination buffer. ///
buffer System.IntPtr /// The destination buffer. ///
Результат void

CreateInstanceCore() защищенный Метод

Creates an instance of the ChainedBitmap class.
protected CreateInstanceCore ( ) : System.Windows.Freezable
Результат System.Windows.Freezable

FreezeCore() защищенный Метод

Transitions this instance into a thread-safe, read-only mode.
Override this method if you have additional non-DP state that should be frozen along with the instance.
protected FreezeCore ( bool isChecking ) : bool
isChecking bool /// Whether or not the transition should really happen, or just to /// determine if the transition is possible. ///
Результат bool

OnSourcePropertyChanged() защищенный Метод

protected OnSourcePropertyChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
e System.Windows.DependencyPropertyChangedEventArgs
Результат void

Описание свойств

SourceProperty публичное статическое свойство

The DependencyProperty for the Source property.
public static DependencyProperty,System.Windows SourceProperty
Результат System.Windows.DependencyProperty