Class ToolbarItemBase
Provides a base class for toolbar items with common functionality and properties.
Namespace: Syncfusion.UI.Xaml.Chat
Assembly: Syncfusion.Chat.WinUI.dll
Syntax
public abstract class ToolbarItemBase : DependencyObjectConstructors
ToolbarItemBase()
Declaration
protected ToolbarItemBase()Fields
IsEnabledProperty
Identifies the IsEnabled dependency property.
Declaration
public static readonly DependencyProperty IsEnabledPropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
ItemTemplateProperty
Identifies the Template dependency property.
Declaration
public static readonly DependencyProperty ItemTemplatePropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
ItemTypeProperty
Identifies the ItemType dependency property.
Declaration
public static readonly DependencyProperty ItemTypePropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
TooltipProperty
Identifies the Tooltip dependency property.
Declaration
public static readonly DependencyProperty TooltipPropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
VisibleProperty
Identifies the Visible dependency property.
Declaration
public static readonly DependencyProperty VisiblePropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
Properties
IsEnabled
Gets or sets a value indicating whether the toolbar item is enabled.
Declaration
public bool IsEnabled { get; set; }Property Value
| Type | 
|---|
| System.Boolean | 
ItemTemplate
Gets or sets the template for the toolbar item.
Declaration
public DataTemplate ItemTemplate { get; set; }Property Value
| Type | 
|---|
| Microsoft.UI.Xaml.DataTemplate | 
Remarks
This property allows you to customize the appearance of individual toolbar items.
When set, this template will be used instead of the default template to render the toolbar item.
If this property is null, a default template will be used.
Example:
// Create a custom toolbar item with a custom template
var customItem = new ResponseToolbarItem
{
    ItemType = "Custom",
    Tooltip = "Custom action",
    ItemTemplate = (DataTemplate)Resources["MyCustomTemplate"]
};
// Add the custom item to the toolbar
myAssistView.ResponseToolbarItems.Add(customItem);
ItemType
Gets or set the type of the toolbar item.
Declaration
public ToolBarItemType ItemType { get; set; }Property Value
| Type | 
|---|
| ToolBarItemType | 
Tooltip
Gets or sets the tooltip for the toolbar item.
Declaration
public string Tooltip { get; set; }Property Value
| Type | 
|---|
| System.String | 
Visible
Gets or sets a value indicating whether the toolbar item is visible.
Declaration
public bool Visible { get; set; }Property Value
| Type | 
|---|
| System.Boolean |