In This Article

ColorBarGalleryItemViewModel Class

Represents a gallery item view model for a color.

public class ColorBarGalleryItemViewModel : BarGalleryItemViewModel<Color>, IBarGalleryItemViewModel, IEquatable<IBarGalleryItemViewModel>
Inheritance:
object ObservableObjectBase BarGalleryItemViewModel<Color> object
Implements:
IBarGalleryItemViewModel IEquatable<IBarGalleryItemViewModel>

Constructors

ColorBarGalleryItemViewModel()

Initializes a new instance of the class.

public ColorBarGalleryItemViewModel()

ColorBarGalleryItemViewModel(Color)

Initializes a new instance of the class with the specified color.

public ColorBarGalleryItemViewModel(Color value)
Parameter Type Description
value Color

The color represented by the gallery item.

ColorBarGalleryItemViewModel(Color, string)

Initializes a new instance of the class with the specified color and category.

public ColorBarGalleryItemViewModel(Color value, string category)
Parameter Type Description
value Color

The color represented by the gallery item.

category string

The item's category, or null if categorization is not supported.

ColorBarGalleryItemViewModel(Color, string, string)

Initializes a new instance of the class with the specified color, category, and label.

public ColorBarGalleryItemViewModel(Color value, string category, string label)
Parameter Type Description
value Color

The color represented by the gallery item.

category string

The item's category, or null if categorization is not supported.

label string

The text label to display, or null if the label can be coerced from the current value.

Methods

CreateDefaultColorPickerCollection()

Creates a default collection of gallery item view models representing a number of standard colors and their various shades, intended for use in a color picker gallery.

public static IEnumerable<ColorBarGalleryItemViewModel> CreateDefaultColorPickerCollection()

Returns

IEnumerable<ColorBarGalleryItemViewModel>:

The collection of gallery item view models that was created.

CreateDefaultTextHighlightCollection()

Creates a default collection of gallery item view models representing a number of background highlight colors, intended for use in a text highlight gallery.

public static IEnumerable<ColorBarGalleryItemViewModel> CreateDefaultTextHighlightCollection()

Returns

IEnumerable<ColorBarGalleryItemViewModel>:

The collection of gallery item view models that was created.

CreateShadedCollection(params ColorBarGalleryItemViewModel[])

Create a collection of gallery item view models representing the shades of colors from the specified base color gallery item view models.

public static IEnumerable<ColorBarGalleryItemViewModel> CreateShadedCollection(params ColorBarGalleryItemViewModel[] baseViewModels)
Parameter Type Description
baseViewModels ColorBarGalleryItemViewModel[]

The base color gallery item view models to examine.

Returns

IEnumerable<ColorBarGalleryItemViewModel>:

The collection of gallery item view models that was created.

Inherited Members