In This Article

UIRenderer Class

Provides a base implementation of IUIRenderer.

[ToolboxBitmap(typeof(ScrollBarRenderer))]
[TypeConverter(typeof(GenericExpandableNullableObjectConverter))]
public abstract class UIRenderer : DisposableObjectBase, IDisposable, IUIRenderer
Inheritance:
object DisposableObjectBase object
Derived:
BarRenderer StatusBarRenderer DockRenderer TabStripRenderer NavigationBarRenderer ScrollBarRenderer SyntaxEditorRenderer WizardRenderer
Implements:
IDisposable IUIRenderer

Constructors

UIRenderer()

Initializes an instance of the class.

protected UIRenderer()

UIRenderer(IWindowsColorScheme)

Initializes an instance of the class.

protected UIRenderer(IWindowsColorScheme colorScheme)
Parameter Type Description
colorScheme IWindowsColorScheme

The IWindowsColorScheme to use as a base for the colors.

Properties

ColorScheme

The IWindowsColorScheme to be used by the renderer.

[Browsable(false)]
public IWindowsColorScheme ColorScheme { get; set; }

Property Value

IWindowsColorScheme

IsSystemUserPreferenceColorChangeMonitored

Indicates if the renderer should listen for changes in system user preferences and invoke OnSystemUserPreferenceColorChanged() when a color change is detected.

protected virtual bool IsSystemUserPreferenceColorChangeMonitored { get; }

Property Value

bool:

true if the renderer should monitor for changes; otherwise, false if the renderer should not monitor for changes. The default value is true.

Methods

Dispose(bool)

Releases the unmanaged resources used by the object and optionally releases the managed resources.

protected override void Dispose(bool disposing)
Parameter Type Description
disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks

This method is called by the public Dispose() method and the Finalize method. Dispose invokes this method with the disposing parameter set to true. Finalize invokes this method with disposing set to false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameter Type Description
obj object

The object to compare with the current object.

Returns

bool:

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int:

A hash code for the current object.

OnColorSchemeChanged()

Override this method in derived classes to respond to changes in the ColorScheme property.

protected virtual void OnColorSchemeChanged()

OnPropertyChanged(EventArgs)

Raises the PropertyChangedevent.

protected virtual void OnPropertyChanged(EventArgs e)
Parameter Type Description
e EventArgs

The event data.

OnSystemUserPreferenceColorChanged()

Occurs when user preferences are changed for the color category.

protected virtual void OnSystemUserPreferenceColorChanged()

Remarks

This method will only be invoked if IsSystemUserPreferenceColorChangeMonitored returns true.

Events

PropertyChanged

Occurs after a property is changed.

public event EventHandler? PropertyChanged

Event Type

EventHandler

Inherited Members

Extension Methods