MindFusion.Scheduling for .NET MAUI enables the creation of user-defined themes. The Theme class is abstract and can be inherited. In order to create a custom theme, you have to define a new class derived from Theme and implement all abstract properties.
In order to work properly, all properties of the theme must be explicitly initialized. The theme properties cannot have undefined values. For example a property of type State cannot have Unspecified value. This ensues from the fact that the theme is the last layer in the appearance hierarchy and the mechanism to propagate a request further in the hierarchy when a theme property is undefined will fail.
The following sample code illustrates what is the usual structure of a custom theme class:
C# Copy Code |
---|
public class MyTheme : MindFusion.Scheduling.WinForms.Theme |
All objects that cannot be instantiated directly, such as MonthSettings can be created by calling various protected methods of the base Theme class. For example, in order to create a MonthSettings object, you need to invoke Theme.CreateMonthSettings.