Class ScalingConfiguration
- Namespace
- Icy.Configuration
- Assembly
- IcyUI.dll
Represents the application-wide UI scaling defaults.
public class ScalingConfiguration : ObservableDispatcherObject, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
ScalingConfiguration
- Implements
- Inherited Members
- Extension Methods
Remarks
Every Canvas built against the owning IcyConfiguration combines these values into its EffectiveScale. A canvas may override Mode, ReferenceSize and ReferenceFit individually. UserScale is global, so a single options slider affects every canvas.
Changes take effect on each canvas's next Render() call.
Properties
Mode
Gets or sets how the base scale factor is chosen. Defaults to Dpi.
public UIScaleMode Mode { get; set; }
Property Value
ReferenceFit
Gets or sets how ReferenceSize is fitted to the viewport. Defaults to Fit.
public ReferenceFit ReferenceFit { get; set; }
Property Value
ReferenceSize
Gets or sets the resolution the UI is designed for, used by ReferenceResolution. Defaults to 1920×1080.
public Size ReferenceSize { get; set; }
Property Value
Exceptions
- ArgumentOutOfRangeException
Either dimension is not positive.
UserScale
Gets or sets the user's UI-scale preference, multiplied on top of the base factor. Defaults to 1.
public float UserScale { get; set; }
Property Value
Exceptions
- ArgumentOutOfRangeException
The value is not a finite number greater than zero.