You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
851 B

using CommunityToolkit.Maui.Behaviors;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MVVM.Pages.Component
{
public class CustomToolbarItem : ToolbarItem
{
public CustomToolbarItem()
{
var image = new Image
{
Source = "plus",
};
var behavior = new IconTintColorBehavior
{
TintColor = Color.FromRgb(120,0,0),
};
image.Behaviors.Add(behavior);
//IconImageSource = new FileImageSource { File = "transparent.png" }; // Image transparente (optionnelle)
Clicked += (sender, e) =>
{
// Ajouter le comportement la
};
}
}
}