Skip to content

ColorThemeChangeEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for the color theme change event.

Definition

public class ColorThemeChangeEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the Chart ColorThemeChangeEventArgs
    public partial class ColorThemeChangeEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Application.ColorThemeChanged += Application_ColorThemeChanged;
        }

        private void Application_ColorThemeChanged(ColorThemeChangeEventArgs obj)
        {
            var text = string.Format("Theme Changed To: {0}", obj.ColorTheme);

            Chart.DrawStaticText("text", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);
        }

        public override void Calculate(int index)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Application.ColorThemeChanged += self.on_application_color_theme_changed

    def on_application_color_theme_changed(self, args):
        api.Chart.DrawStaticText("text", f"Theme Changed To: {args.ColorTheme}", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Properties

Name Description
ColorThemeDesktopCLICloudColorTheme Gets the color theme.

See also