FontSizeBarGalleryItemViewModel Class
Represents a gallery item view model for a font size.
public class FontSizeBarGalleryItemViewModel : BarGalleryItemViewModel<double>, IBarGalleryItemViewModel, IEquatable<IBarGalleryItemViewModel>, IHasTag
- Inheritance:
- object ObservableObjectBase BarGalleryItemViewModel<double> object
Constructors
FontSizeBarGalleryItemViewModel()
Initializes an instance of the class with a default font size.
public FontSizeBarGalleryItemViewModel()
FontSizeBarGalleryItemViewModel(double)
Initializes an instance of the class with the specified size and a default category.
public FontSizeBarGalleryItemViewModel(double value)
| Parameter | Type | Description |
|---|---|---|
| value | double | The font size. |
FontSizeBarGalleryItemViewModel(double, string?)
Initializes an instance of the class with the specified size and category.
public FontSizeBarGalleryItemViewModel(double value, string? category)
| Parameter | Type | Description |
|---|---|---|
| value | double | The font size. |
| category | string | The item's category, or |
FontSizeBarGalleryItemViewModel(double, string?, string?)
Initializes an instance of the class with the specified size, category, and label.
public FontSizeBarGalleryItemViewModel(double value, string? category, string? label)
| Parameter | Type | Description |
|---|---|---|
| value | double | The font size. |
| category | string | The item's category, or |
| label | string | The text label to display, or |
Properties
DefaultCategory
The localizable default category to be used for view models of this type.
IsLabelVisible
Indicates whether the Label is visible.
public override bool IsLabelVisible { get; }
Property Value
Value
The value associated with this view model.
public override double Value { get; set; }
Property Value
Remarks
The value must be 1.0 or greater.
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
Methods
ConvertFontSizeFromWpfFontSize(double)
Converts a WPF font size to a display font size (used in this view model).
public static double ConvertFontSizeFromWpfFontSize(double wpfFontSize)
| Parameter | Type | Description |
|---|---|---|
| wpfFontSize | double | The WPF font size to convert. |
Returns
- double:
The converted font size.
ConvertFontSizeToWpfFontSize(double)
Converts a display font size (used in this view model) to a WPF font size.
public static double ConvertFontSizeToWpfFontSize(double fontSize)
| Parameter | Type | Description |
|---|---|---|
| fontSize | double | The display font size to convert. |
Returns
- double:
The converted font size.
CreateDefaultCollection()
Creates a default collection of gallery item view models representing common font sizes.
public static IEnumerable<FontSizeBarGalleryItemViewModel> CreateDefaultCollection()
Returns
- IEnumerable<FontSizeBarGalleryItemViewModel>:
The collection of gallery item view models that was created.
CreateDefaultCollectionViewSource(bool)
Creates an CollectionViewSource of gallery item view models representing common font sizes, allowing for possible categorization and filtering.
public static CollectionViewSource CreateDefaultCollectionViewSource(bool categorize)
| Parameter | Type | Description |
|---|---|---|
| categorize | bool | Whether the collection view source should support categorization by including a group description based on Category property values. |
Returns
- CollectionViewSource:
The CollectionViewSource of gallery item view models that was created.
Inherited Members
- BarGalleryItemViewModel<double>.CoerceLabel()
- BarGalleryItemViewModel<double>.ConvertEnumValueToString<TEnum>(TEnum, bool)
- BarGalleryItemViewModel<double>.ConvertEnumValueToString(Type, object, bool)
- BarGalleryItemViewModel<double>.Equals(object)
- BarGalleryItemViewModel<double>.Equals(IBarGalleryItemViewModel)
- BarGalleryItemViewModel<double>.GetHashCode()
- BarGalleryItemViewModel<double>.OnValueChanged()
- BarGalleryItemViewModel<double>.ToString()
- BarGalleryItemViewModel<double>.Category
- BarGalleryItemViewModel<double>.Description
- BarGalleryItemViewModel<double>.ImageSource
- BarGalleryItemViewModel<double>.IsVisible
- BarGalleryItemViewModel<double>.KeyTipText
- BarGalleryItemViewModel<double>.Label
- BarGalleryItemViewModel<double>.LayoutBehavior
- BarGalleryItemViewModel<double>.Tag
- ObservableObjectBase.NotifyPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(string)
- ObservableObjectBase.OnPropertyChanged(PropertyChangedEventArgs)
- ObservableObjectBase.OnPropertyChanging(string)
- ObservableObjectBase.OnPropertyChanging(PropertyChangingEventArgs)
- ObservableObjectBase.SetProperty<T>(ref T, T, string)
- ObservableObjectBase.PropertyChanged
- ObservableObjectBase.PropertyChanging
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object, object)
- object.ReferenceEquals(object, object)