ThemedImageConverter Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts an input ImageSource into an Image control whose Source blends in with the target background.
This converter performs two conversions.
If the inputs are a source BitmapSource, the target background color, and a bool indicating whether or not
the image should have an enabled appearance, based on these inputs, the following transformations are performed:
- 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
- The image is converted to grayscale if the isEnabled parameter is false. This uses the parameter (optional), which should be a "biasColor" used during grayscale transformation. If the parameter is not specified, White is used as the bias color. If the input cannot be converted to a BitmapSource, no image manipulation is performed and the ImageSource is used directly as the Source of the resulting Image control.
public ref class ThemedImageConverter sealed : Microsoft::VisualStudio::PlatformUI::MultiValueConverter<System::Windows::Media::ImageSource ^, System::Windows::Media::Color, bool, System::Windows::Controls::Image ^>
public ref class ThemedImageConverter sealed : Microsoft::VisualStudio::PlatformUI::MultiValueConverter<System::Windows::Media::ImageSource ^, System::Windows::Media::Color, bool, System::Windows::Controls::Image ^>
class ThemedImageConverter sealed : Microsoft::VisualStudio::PlatformUI::MultiValueConverter<System::Windows::Media::ImageSource, System::Windows::Media::Color, bool, System::Windows::Controls::Image const &>
public sealed class ThemedImageConverter : Microsoft.VisualStudio.PlatformUI.MultiValueConverter<System.Windows.Media.ImageSource,System.Windows.Media.Color,bool,System.Windows.Controls.Image>
type ThemedImageConverter = class
inherit MultiValueConverter<ImageSource, Color, bool, Image>
Public NotInheritable Class ThemedImageConverter
Inherits MultiValueConverter(Of ImageSource, Color, Boolean, Image)
- Inheritance
-
ThemedImageConverter
Remarks
This converter performs two conversions:
If the inputs are a source BitmapSource, the target background color, and a bool indicating whether or not he image should have an enabled appearance, based on these inputs, the following transformations are performed:
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.
The image is converted to grayscale if the isEnabled parameter is false. This uses the parameter (optional), which should be a biasColor used during grayscale transformation. If the parameter is not specified, White is used as the bias color.
If the input cannot be converted to a BitmapSource, no image manipulation is performed and the ImageSource is used directly as the Source of the resulting Image control.
Constructors
ThemedImageConverter() |
Microsoft internal use only. |