Udostępnij za pośrednictwem


CrispImage Class

Definition

An Image class that gets its Source from the image library and renders it crisply at any DPI setting.

public ref class CrispImage sealed : System::Windows::Controls::Image
public sealed class CrispImage : System.Windows.Controls.Image
type CrispImage = class
    inherit Image
Public NotInheritable Class CrispImage
Inherits Image
Inheritance
CrispImage

Remarks

CrispImage is sealed to prevent initialization problems stemming from the Created event, which can call outside the class and could result in derived classes not being initialized yet.

Constructors

CrispImage()

Fields

ActualDpiProperty

This property ultimately determines the DPI scaling applied to CrispImages. Its value is a function of DefaultDpi and Dpi.

ActualGrayscaleBiasColorProperty

This property ultimately determines the grayscale bias color for the image. Its value is a function of GrayscaleBiasColor and ActualHighContrast.

ActualHighContrastProperty

This property ultimately determines whether the image is rendered high-contrast. Its value is a function of HighContrast and SystemHighContrast.

ActualImageLibraryProperty

This property ultimately determines the image library from which images are loaded. Its value is a function of DefaultImageLibrary and ImageLibrary.

ConverterTaskProperty
DefaultImageLibraryProperty

Exposes a PropertyInfo for the DefaultImageLibrary property so that the static property can be used in PropertyPaths for bindings created in code.

DpiProperty

Defines the DPI used by the CrispImages which are desendants of the element to which this property is attached. If this is 0.0, DefaultDpi is used.

Attached to FrameworkElement

GrayscaleBiasColorProperty

Defines the grayscale bias color used by the CrispImages which are desendants of the element to which this property is attached. If the value is null, the bias color is chosen based on the high-contrast setting.

Attached to FrameworkElement

GrayscaleProperty

Defines the grayscale color used by the CrispImage objects that are descendants of the element to which this property is attached.

HighContrastProperty

Controls whether the CrispImages which are desendants of the element to which this property is attached show high-contrast images:

True - Images are high-contrast False - Images are not high-contrast null - Images are displayed according to the system high-contrast setting

Attached to FrameworkElement

ImageLibraryProperty

Defines the image library used by the CrispImages which are desendants of the element to which this property is attached. If this is null, DefaultImageLibrary is used.

Attached to FrameworkElement

MonikerProperty

The moniker to use when loading the CrispImage's image from the image library

ScaleFactorProperty

The ScaleFactor is used to accommodate scenarios where the image may be scaled using a transform, such as for an image in the editor margin when the zoom != 100%. A ScaleFactor of 1 does no scaling.

Attached to FrameworkElement

ShowDiagnosticToolTipProperty

Determines whether the CrispImages which are desendants of the element to which this property is attached will display a diagnostic tooltip.

Attached to FrameworkElement

SystemHighContrastProperty

The value of SystemParameters.HighContrast. It is defined as a dependency property here so it can be used in a binding to set the value of ActualHighContrast.

Properties

ActualDpi

Gets the actual DPI property.

ActualGrayscaleBiasColor

Gets the actual grayscale bias color.

ActualHighContrast

Determines whether the image is high contrast.

ActualImageLibrary

The actual image library.

ConverterTask
DefaultDpi

The default DPI used for CrispImages that don't have their Dpi property set

DefaultImageLibrary

The image library used for CrispImages that don't have their ImageLibrary property set

Grayscale

Defines the grayscale color used by the CrispImage objects that are descendants of the element to which this property is attached.

Moniker

Gets the moniker to use when loading the CrispImage's image from the image library.

SystemHighContrast

Gets the value of SystemParameters.HighContrast

Attached Properties

Dpi

Defines the DPI used by the CrispImage objects that are descendants of the element to which this property is attached. If this is 0.0, DefaultDpi is used.

GrayscaleBiasColor

Gets the grayscale bias color used by the CrispImage objects that are descendants of the element to which this property is attached.

HighContrast

Determines whether the CrispImage objects that are descendants of the element to which this property is attached show high-contrast images.

ImageLibrary

Defines the image library used by the CrispImage objects that are descendants of the element to which this property is attached. If this is null, DefaultImageLibrary is used.

ScaleFactor

Gets the ScaleFactor that is used when the image may be scaled using a transform, such as for an image in the editor margin when the zoom != 100%. A ScaleFactor of 1 does no scaling.

ShowDiagnosticToolTip

Methods

GetDpi(DependencyObject)

Gets the used by the CrispImage objects that are descendants of the element to which this property is attached. If this is 0.0, DefaultDpi is used.

GetGrayscaleBiasColor(DependencyObject)

Gets the grayscale bias color used by the CrispImage objects that are descendants of the element to which this property is attached.

GetHighContrast(DependencyObject)

Determines whether the CrispImage objects that are descendants of the element to which this property is attached show high-contrast images.

GetImageLibrary(DependencyObject)

Defines the image library used by the CrispImage objects that are descendants of the element to which this property is attached. If this is null, DefaultImageLibrary is used.

GetScaleFactor(DependencyObject)

Gets the ScaleFactor that is used when the image may be scaled using a transform, such as for an image in the editor margin when the zoom != 100%. A ScaleFactor of 1 does no scaling.

GetShowDiagnosticToolTip(DependencyObject)
SetDpi(DependencyObject, Double)

Defines the DPI used by the CrispImage objects that are descendants of the element to which this property is attached. If this is 0.0, DefaultDpi is used.

SetGrayscaleBiasColor(DependencyObject, Nullable<Color>)

Sets the grayscale bias color used by the CrispImage objects that are descendants of the element to which this property is attached.

SetHighContrast(DependencyObject, Nullable<Boolean>)

Determines whether the CrispImage objects that are descendants of the element to which this property is attached show high-contrast images.

SetImageLibrary(DependencyObject, ImageLibrary)

Defines the image library used by the CrispImage objects that are descendants of the element to which this property is attached. If this is null, DefaultImageLibrary is used.

SetScaleFactor(DependencyObject, Double)

Sets the ScaleFactor that is used when the image may be scaled using a transform, such as for an image in the editor margin when the zoom != 100%. A ScaleFactor of 1 does no scaling.

SetShowDiagnosticToolTip(DependencyObject, Boolean)

Events

Created

Raised when an instance of CrispImage is created

DefaultImageLibraryChanged

Raised when CrispImage.DefaultImageLibrary is changed

Applies to