Class BannerView
Represents a header view for the AI Assist control, displaying an avatar, title, and subtitle.
Inheritance
Namespace: Syncfusion.WinForms.AIAssistView
Assembly: Syncfusion.SfAIAssistView.WinForms.dll
Syntax
public class BannerView : UserControl, IThemeProvider, IVisualStyle, IDisposable
Constructors
BannerView()
Initializes a new instance of the BannerView class.
Declaration
public BannerView()
Properties
BaseThemeName
Gets or sets the name of the base theme from which the current theme is derived.
Declaration
protected string BaseThemeName { get; set; }
Property Value
| Type |
|---|
| System.String |
CanApplyTheme
Gets or sets a value indicating whether a theme style has been applied to the control.
Declaration
public bool CanApplyTheme { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is true. |
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 |
|---|
| System.String |
IsVisualStyleEnabled
Declaration
public bool IsVisualStyleEnabled { get; }
Property Value
| Type |
|---|
| System.Boolean |
Style
Declaration
public BannerViewStyle Style { get; set; }
Property Value
| Type |
|---|
| BannerViewStyle |
ThemeName
Gets or sets the theme name of the button 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.
VisualTheme
Gets or sets the visualTheme of the control, which holds the ThemeName applied from SkinManager
Declaration
protected string VisualTheme { get; set; }
Property Value
| Type |
|---|
| System.String |
Methods
Dispose(Boolean)
Disposes of the resources used by the header view.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | True to release both managed and unmanaged resources; false to release only unmanaged resources. |
GetActiveThemeName()
Declaration
public string GetActiveThemeName()
Returns
| Type |
|---|
| System.String |
OnPaint(PaintEventArgs)
Raises the Paint event and sets the background color.
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.PaintEventArgs | e | The paint event arguments. |
OnResize(EventArgs)
Handles the resize event to ensure the control matches the width of its parent.
Declaration
protected override void OnResize(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An System.EventArgs that contains the event data. |
Events
ThemeNameChanged
Occurs when theme name of the BannerView has changed.
Declaration
public event ThemeChangedEventHandler ThemeNameChanged
Event Type
| Type |
|---|
| ThemeChangedEventHandler |
Explicit Interface Implementations
IVisualStyle.VisualTheme
Gets or sets the VisualTheme of the control.
Declaration
string IVisualStyle.VisualTheme { get; set; }
Returns
| Type |
|---|
| System.String |
IThemeProvider.BaseThemeName
Gets the base theme name used for theme calculations.
Declaration
string IThemeProvider.BaseThemeName { get; set; }
Returns
| Type |
|---|
| System.String |