WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class BaseComponent

    Show / Hide Table of Contents

    Class BaseComponent

    Represents a BaseComponent with IThemeProvider VisualStyle based theme customization settings.

    Inheritance
    System.Object
    BaseComponent
    ScrollersFrame
    SfToolTip
    AutoComplete
    CommandBarController
    DockingManager
    SpellCheckerAdv
    SuperAccelerator
    SuperToolTip
    TabbedMDIManager
    BarManager
    PopupMenu
    SfScrollFrame
    Implements
    IThemeProvider
    IVisualStyle
    System.IDisposable
    Namespace: Syncfusion.Windows.Forms.Core
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class BaseComponent : Component, IThemeProvider, IVisualStyle, IDisposable

    Constructors

    BaseComponent()

    Declaration
    public BaseComponent()

    Properties

    CanApplyTheme

    Gets or sets a value indicating whether a SkinManager theme settings can be applied to the control.

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

    The default value is true.

    Remarks

    This property must be initialized before applying the VisualTheme />

    CanOverrideStyle

    Gets or sets a value indicating whether control elements styles can be overridden by theme style settings.

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

    Default value is false.

    Remarks

    By default, the control's element styles will not be overridden by theme style settings if the style is set in sample level. If this property is enabled, element style will be overridden by theme style settings event if it is set in sample level. This property should be enabled or disabled before calling the ThemeName property of the control.

    ControlName

    Gets the name of the control.

    Declaration
    public string ControlName { get; }
    Property Value
    Type Description
    System.String

    IsVisualStyleEnabled

    Gets a value indicating whether the visual style based theme is applied to the control and also indicates whether the theme files are referred from external assemblies or not.

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

    Return true, if the visual style based theme is applied to the control. Otherwise returns false.

    ThemeName

    Gets or sets the theme name of the control.

    Declaration
    public string ThemeName { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null.

    Remarks

    The theme will be applied only when the particular theme for this control has included the Themes assembly.

    Methods

    GetActiveThemeName()

    Gets the active theme name of the control.

    Declaration
    public virtual string GetActiveThemeName()
    Returns
    Type Description
    System.String

    Returns the active theme name.

    GetControlName(String)

    Helps to override the ThemeName property settings

    Declaration
    public virtual string GetControlName(string controlName)
    Parameters
    Type Name Description
    System.String controlName

    ThemeName

    Returns
    Type Description
    System.String

    OnCanApplyThemeChanged(Boolean)

    Helps to override the CanApplyTheme property settings

    Declaration
    public virtual void OnCanApplyThemeChanged(bool canApplyTheme)
    Parameters
    Type Name Description
    System.Boolean canApplyTheme

    OnCanOverrideStyleChanged(Boolean)

    Helps to override the CanOverriderStyle property settings

    Declaration
    public virtual void OnCanOverrideStyleChanged(bool canOverriderStyle)
    Parameters
    Type Name Description
    System.Boolean canOverriderStyle

    OnThemeNameChanged(String)

    Helps to override the ThemeName property settings

    Declaration
    public virtual void OnThemeNameChanged(string themeName)
    Parameters
    Type Name Description
    System.String themeName

    ThemeName

    RaiseThemeChanged(Object, ThemeChangedEventArgs)

    Raises the ThemeNameChanged event when theme name changed.

    Declaration
    protected virtual void RaiseThemeChanged(object sender, ThemeChangedEventArgs args)
    Parameters
    Type Name Description
    System.Object sender

    The sender value.

    ThemeChangedEventArgs args

    A ThemeChangedEventArgs contains the event data.

    Events

    ThemeNameChanged

    Occurs when theme name of the control has changed.

    Declaration
    public event ThemeChangedEventHandler ThemeNameChanged
    Event Type
    Type Description
    ThemeChangedEventHandler

    Explicit Interface Implementations

    IVisualStyle.VisualTheme

    Gets or sets the VisualTheme of the control.

    Declaration
    string IVisualStyle.VisualTheme { get; set; }
    Returns
    Type Description
    System.String

    IThemeProvider.BaseThemeName

    Gets or sets the Base Theme name of the theme

    Declaration
    string IThemeProvider.BaseThemeName { get; set; }
    Returns
    Type Description
    System.String

    Implements

    IThemeProvider
    IVisualStyle
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved