[]
        
(Showing Draft Content)

C1.Blazor.Ribbon.C1Tool

C1Tool Class

C1Tool represents the base abstract class for different tools like C1ButtonTool, C1ToggleButtonTool, C1DropDownTool, C1ContentControlTool.

Namespace: C1.Blazor.Ribbon
Assembly: C1.Blazor.Ribbon.dll
Syntax
public abstract class C1Tool : C1View, IHandleAfterRender, IDependencyObject, IHandleEvent, IDisposable, IComponent
Public MustInherit Class C1Tool
    Inherits C1View
    Implements IHandleAfterRender, IDependencyObject, IHandleEvent, IDisposable, IComponent

Constructors

Name Description
C1Tool()

Initializes a new instance of the C1Tool class.

Fields

Name Description
AllowMergingProperty

Identifies the AllowMerging dependency property.

DescriptionProperty

Identifies the Description dependency property.

HotKeyProperty

Identifies the HotKey dependency property.

IconSizeProperty

Identifies the IconSize dependency property.

IconTemplateProperty

Identifies the IconTemplate dependency property.

LabelProperty

Identifies the Label dependency property.

LabelVisibilityProperty

Identifies the LabelVisibility dependency property.

LargeIconTemplateProperty

Identifies the LargeIconTemplate dependency property.

MouseOverBrushProperty

Identifies the MouseOverBrush dependency property.

OrientationProperty

Identifies the Orientation dependency property.

PressedBrushProperty

Identifies the PressedBrush dependency property.

SmallIconTemplateProperty

Identifies the SmallIconTemplate dependency property.

Properties

Name Description
ActualIconSize

Returns the effective value of icon size, taking into account the IconSize and ToolIconSize values.

ActualOrientation

Returns the effective value of orientation, taking into account the Orientation and ToolOrientation values.

AllowMerging

Gets or sets a value indicating whether the tool can be merged with adjacent tools which also has this property set to 'true' when they are placed on C1ToolStrip.

Description

Gets or sets a more descriptive text that will be shown in tooltips.

HotKey

Gets or sets the hotkey text that will be displayed in tooltips and overflow menus.

IconSize

Gets or sets the size of the icon.

IconTemplate

Gets or sets the template of the icon.

IsEditable

Gets whether the tool is editable and can get the keyboard focus to enter text.

Label

Gets or sets the text that will shown inside the tool and in the menus.

LabelVisibility

Gets or sets the visibility of the label.

LargeIconTemplate

Gets or sets the template used when the icon size is greater or equals to 24 pixels.

MouseOverBrush

Gets or sets the C1Color used to highlight the control when it has the mouse over.

Orientation

Gets or sets the orientation of the tool element. When is Horizontal, the label will be drawn at the right of the icon, and when it is vertical, the label will be displayed at the bottom of the icon.

PressedBrush

Gets or sets the C1Color used to paint a button when it is pressed.

SmallIconTemplate

Gets or sets the template used when the icon size is smaller or equals to 12 pixels.

TemplateSettings

Gets the settings that can be bound in the template of the control.

Methods

Name Description
Dispose(bool)
Execute(object)

Called when the tool is executed.

GetContentRenderFragment(C1Style)

Returns a RenderFragment that represents the tool's UI content.

OnAfterRender(bool)
OnInitialized()
ShouldRender()
UpdateLabel()

UpdateLabel