ImageThemingUtilities ImageThemingUtilities ImageThemingUtilities ImageThemingUtilities ImageThemingUtilities ImageThemingUtilities Class

Definition

Contains utility methods for grayscaling and transforming color spaces within images.

public ref class ImageThemingUtilities abstract sealed
public ref class ImageThemingUtilities abstract sealed
class ImageThemingUtilities abstract sealed
public static class ImageThemingUtilities
type ImageThemingUtilities = class
Public Module ImageThemingUtilities
Inheritance
ImageThemingUtilitiesImageThemingUtilitiesImageThemingUtilitiesImageThemingUtilitiesImageThemingUtilitiesImageThemingUtilities

Fields

ImageBackgroundColorProperty ImageBackgroundColorProperty ImageBackgroundColorProperty ImageBackgroundColorProperty ImageBackgroundColorProperty ImageBackgroundColorProperty

Gets or sets the color used for image theming. The target color is used to map the "halo" color in an image with the target background color. It should be attached on the same UIElement that the gackground color is set on when images are drawn directly on that Background. The reasons why the background is not used directly:1. Backgrounds that are set to Transparent would require a visual tree walk to find the real background.2. The background is a Brush, not a Color, which would require interpretation to arrive at a Color instead.3. The ultimate background the image is drawn on may not be the desired image to use for theming, for example when a selection brush is conditionally shown in a TreeView.

ThemeScrollBarsProperty ThemeScrollBarsProperty ThemeScrollBarsProperty ThemeScrollBarsProperty ThemeScrollBarsProperty ThemeScrollBarsProperty

Controls whether the ScrollBars of this element and its descendants have themed scrollbars. It is attached to FrameworkElementTrue - ScrollBars are themedFalse - ScrollBars are not themednull - ScrollBar theme state is inherited

Properties

IsImageThemingEnabled IsImageThemingEnabled IsImageThemingEnabled IsImageThemingEnabled IsImageThemingEnabled IsImageThemingEnabled

Attached Properties

ImageBackgroundColor ImageBackgroundColor ImageBackgroundColor ImageBackgroundColor ImageBackgroundColor ImageBackgroundColor

Gets or sets the color used for image theming. The target color is used to map the "halo" color in an image with the target background color. It should be attached on the same UIElement that the gackground color is set on when images are drawn directly on that Background. The reasons why the background is not used directly:1. Backgrounds that are set to Transparent would require a visual tree walk to find the real background.2. The background is a Brush, not a Color, which would require interpretation to arrive at a Color instead.3. The ultimate background the image is drawn on may not be the desired image to use for theming, for example when a selection brush is conditionally shown in a TreeView.

ThemeScrollBars ThemeScrollBars ThemeScrollBars ThemeScrollBars ThemeScrollBars ThemeScrollBars

Controls whether the ScrollBars of this element and its descendants have themed scrollbars. It is attached to FrameworkElementTrue - ScrollBars are themedFalse - ScrollBars are not themednull - ScrollBar theme state is inherited

Methods

ClearOptOutPixel(Byte*, Int32, Int32, Boolean) ClearOptOutPixel(Byte*, Int32, Int32, Boolean) ClearOptOutPixel(Byte*, Int32, Int32, Boolean) ClearOptOutPixel(Byte*, Int32, Int32, Boolean) ClearOptOutPixel(Byte*, Int32, Int32, Boolean) ClearOptOutPixel(Byte*, Int32, Int32, Boolean)
ClearOptOutPixel(Byte[], Int32, Int32, Boolean) ClearOptOutPixel(Byte[], Int32, Int32, Boolean) ClearOptOutPixel(Byte[], Int32, Int32, Boolean) ClearOptOutPixel(Byte[], Int32, Int32, Boolean) ClearOptOutPixel(Byte[], Int32, Int32, Boolean) ClearOptOutPixel(Byte[], Int32, Int32, Boolean)
ClearWeakImageCache() ClearWeakImageCache() ClearWeakImageCache() ClearWeakImageCache() ClearWeakImageCache() ClearWeakImageCache()
GetImageBackgroundColor(DependencyObject) GetImageBackgroundColor(DependencyObject) GetImageBackgroundColor(DependencyObject) GetImageBackgroundColor(DependencyObject) GetImageBackgroundColor(DependencyObject) GetImageBackgroundColor(DependencyObject)

Gets the ImageBackgroundColor property.

GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color) GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color) GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color) GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color) GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color) GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color)

Converts an input BitmapSource into an BitmapSource that blends in with the target background. This converter performs two conversions.1. The luminosity of the image is transformed so that the constant "halo" luminosity blends in with the background. This has the effect of eliminating the halo visually. The "halo" luminosity is an immutable constant, and is not calculated from the input image.2. The image is converted to grayscale if the isEnabled parameter is false. This uses the "biasColor" to determine how to transform the image to grayscale.

GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color, Boolean) GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color, Boolean) GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color, Boolean) GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color, Boolean) GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color, Boolean) GetOrCreateThemedBitmapSource(BitmapSource, Color, Boolean, Color, Boolean)
GetThemedBitmap(Bitmap, Color) GetThemedBitmap(Bitmap, Color) GetThemedBitmap(Bitmap, Color) GetThemedBitmap(Bitmap, Color) GetThemedBitmap(Bitmap, Color) GetThemedBitmap(Bitmap, Color)

Creates a new Bitmap, based on the input one, but the new one blends in with the target background.

GetThemedBitmap(Bitmap, UInt32) GetThemedBitmap(Bitmap, UInt32) GetThemedBitmap(Bitmap, UInt32) GetThemedBitmap(Bitmap, UInt32) GetThemedBitmap(Bitmap, UInt32) GetThemedBitmap(Bitmap, UInt32)

Creates a new Bitmap, based on the input one, but the new one blends in with the target background.

GetThemedBitmap(Bitmap, Color, Boolean) GetThemedBitmap(Bitmap, Color, Boolean) GetThemedBitmap(Bitmap, Color, Boolean) GetThemedBitmap(Bitmap, Color, Boolean) GetThemedBitmap(Bitmap, Color, Boolean) GetThemedBitmap(Bitmap, Color, Boolean)
GetThemedBitmap(Bitmap, UInt32, Boolean) GetThemedBitmap(Bitmap, UInt32, Boolean) GetThemedBitmap(Bitmap, UInt32, Boolean) GetThemedBitmap(Bitmap, UInt32, Boolean) GetThemedBitmap(Bitmap, UInt32, Boolean) GetThemedBitmap(Bitmap, UInt32, Boolean)
GetThemeScrollBars(DependencyObject) GetThemeScrollBars(DependencyObject) GetThemeScrollBars(DependencyObject) GetThemeScrollBars(DependencyObject) GetThemeScrollBars(DependencyObject) GetThemeScrollBars(DependencyObject)

Gets the ThemeScrollbarsProperty value.

GrayscaleDIBits(Byte[], Int32, Color) GrayscaleDIBits(Byte[], Int32, Color) GrayscaleDIBits(Byte[], Int32, Color) GrayscaleDIBits(Byte[], Int32, Color) GrayscaleDIBits(Byte[], Int32, Color) GrayscaleDIBits(Byte[], Int32, Color)

Transforms a BGRA32 device-independent bitmap to grayscale.

IsDark(Color) IsDark(Color) IsDark(Color) IsDark(Color) IsDark(Color) IsDark(Color)
IsLight(Color) IsLight(Color) IsLight(Color) IsLight(Color) IsLight(Color) IsLight(Color)
IsOptOutPixelSet(Byte*, Int32, Int32, Boolean) IsOptOutPixelSet(Byte*, Int32, Int32, Boolean) IsOptOutPixelSet(Byte*, Int32, Int32, Boolean) IsOptOutPixelSet(Byte*, Int32, Int32, Boolean) IsOptOutPixelSet(Byte*, Int32, Int32, Boolean) IsOptOutPixelSet(Byte*, Int32, Int32, Boolean)
IsOptOutPixelSet(Byte[], Int32, Int32, Boolean) IsOptOutPixelSet(Byte[], Int32, Int32, Boolean) IsOptOutPixelSet(Byte[], Int32, Int32, Boolean) IsOptOutPixelSet(Byte[], Int32, Int32, Boolean) IsOptOutPixelSet(Byte[], Int32, Int32, Boolean) IsOptOutPixelSet(Byte[], Int32, Int32, Boolean)
ModifyBitmap(BitmapSource, ImageThemingUtilities+ModifyPixelCallback) ModifyBitmap(BitmapSource, ImageThemingUtilities+ModifyPixelCallback) ModifyBitmap(BitmapSource, ImageThemingUtilities+ModifyPixelCallback) ModifyBitmap(BitmapSource, ImageThemingUtilities+ModifyPixelCallback) ModifyBitmap(BitmapSource, ImageThemingUtilities+ModifyPixelCallback) ModifyBitmap(BitmapSource, ImageThemingUtilities+ModifyPixelCallback)
SetImageBackgroundColor(DependencyObject, Color) SetImageBackgroundColor(DependencyObject, Color) SetImageBackgroundColor(DependencyObject, Color) SetImageBackgroundColor(DependencyObject, Color) SetImageBackgroundColor(DependencyObject, Color) SetImageBackgroundColor(DependencyObject, Color)

Sets the ImageBackgroundColor property.

SetOptOutPixel(BitmapSource) SetOptOutPixel(BitmapSource) SetOptOutPixel(BitmapSource) SetOptOutPixel(BitmapSource) SetOptOutPixel(BitmapSource) SetOptOutPixel(BitmapSource)
SetOptOutPixel(Byte*, Int32, Int32, Boolean) SetOptOutPixel(Byte*, Int32, Int32, Boolean) SetOptOutPixel(Byte*, Int32, Int32, Boolean) SetOptOutPixel(Byte*, Int32, Int32, Boolean) SetOptOutPixel(Byte*, Int32, Int32, Boolean) SetOptOutPixel(Byte*, Int32, Int32, Boolean)
SetOptOutPixel(Byte[], Int32, Int32, Boolean) SetOptOutPixel(Byte[], Int32, Int32, Boolean) SetOptOutPixel(Byte[], Int32, Int32, Boolean) SetOptOutPixel(Byte[], Int32, Int32, Boolean) SetOptOutPixel(Byte[], Int32, Int32, Boolean) SetOptOutPixel(Byte[], Int32, Int32, Boolean)
SetThemeScrollBars(DependencyObject, Nullable<Boolean>) SetThemeScrollBars(DependencyObject, Nullable<Boolean>) SetThemeScrollBars(DependencyObject, Nullable<Boolean>) SetThemeScrollBars(DependencyObject, Nullable<Boolean>) SetThemeScrollBars(DependencyObject, Nullable<Boolean>) SetThemeScrollBars(DependencyObject, Nullable<Boolean>)

Sets the ThemeScrollbarsProperty value.

ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32) ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32) ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32) ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32) ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32) ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32)
ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32, Boolean) ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32, Boolean) ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32, Boolean) ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32, Boolean) ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32, Boolean) ThemeDIBits(Int32, Byte[], Int32, Int32, Boolean, UInt32, Boolean)
ThemePixel(Byte, Byte, Byte, HslColor) ThemePixel(Byte, Byte, Byte, HslColor) ThemePixel(Byte, Byte, Byte, HslColor) ThemePixel(Byte, Byte, Byte, HslColor) ThemePixel(Byte, Byte, Byte, HslColor) ThemePixel(Byte, Byte, Byte, HslColor)
ThemePixel(Byte, Byte, Byte, HslColor, Boolean) ThemePixel(Byte, Byte, Byte, HslColor, Boolean) ThemePixel(Byte, Byte, Byte, HslColor, Boolean) ThemePixel(Byte, Byte, Byte, HslColor, Boolean) ThemePixel(Byte, Byte, Byte, HslColor, Boolean) ThemePixel(Byte, Byte, Byte, HslColor, Boolean)

Events

ThemeScrollBarsChanged ThemeScrollBarsChanged ThemeScrollBarsChanged ThemeScrollBarsChanged ThemeScrollBarsChanged ThemeScrollBarsChanged

Applies to