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 : DependencyObject
Constructors
ToolbarItemBase()
Declaration
protected ToolbarItemBase()
Fields
IsEnabledProperty
Identifies the IsEnabled dependency property.
Declaration
public static readonly DependencyProperty IsEnabledProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
ItemTemplateProperty
Identifies the Template dependency property.
Declaration
public static readonly DependencyProperty ItemTemplateProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
ItemTypeProperty
Identifies the ItemType dependency property.
Declaration
public static readonly DependencyProperty ItemTypeProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
TooltipProperty
Identifies the Tooltip dependency property.
Declaration
public static readonly DependencyProperty TooltipProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
VisibleProperty
Identifies the Visible dependency property.
Declaration
public static readonly DependencyProperty VisibleProperty
Field 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.ResponsetToolbarItems.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 |