Show / Hide Table of Contents

Class Theme

Provides a base class for defining themes.

Inheritance
System.Object
Theme
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OpenSilver.Theming
Assembly: OpenSilver.dll
Syntax
public abstract class Theme

Constructors

| Improve this Doc View Source

Theme()

Initializes a new instance of the Theme class.

Declaration
protected Theme()

Properties

| Improve this Doc View Source

BasedOn

Gets or sets a defined theme that is the basis of the current theme.

Declaration
public Theme BasedOn { get; set; }
Property Value
Type Description
Theme

A defined theme that is the basis of the current theme. The default value is null.

| Improve this Doc View Source

IsSealed

Gets a value that indicates whether the theme is read-only and cannot be changed.

Declaration
public bool IsSealed { get; }
Property Value
Type Description
System.Boolean

true if the theme is sealed; otherwise, false.

| Improve this Doc View Source

Resources

Gets or sets the locally-defined resource dictionary.

Declaration
public ResourceDictionary Resources { get; set; }
Property Value
Type Description
ResourceDictionary

The current locally-defined dictionary of resources, where each resource can be accessed by key.

Methods

| Improve this Doc View Source

CheckSealed()

Throws an exception if the theme has already been sealed.

Declaration
protected void CheckSealed()
Exceptions
Type Condition
System.InvalidOperationException

The theme has already been sealed.

| Improve this Doc View Source

GenerateResources(Assembly)

Generates resources for a specific assembly.

Declaration
protected abstract ResourceDictionary GenerateResources(Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

The assembly to generate resources for.

Returns
Type Description
ResourceDictionary

A ResourceDictionary that contains resources for assembly.

| Improve this Doc View Source

OnSealed()

Invoked after this theme becomes sealed.

Declaration
protected virtual void OnSealed()
| Improve this Doc View Source

Seal()

Locks the theme so it cannot be changed.

Declaration
public void Seal()
  • Improve this Doc
  • View Source