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.
24 lines
548 B
24 lines
548 B
namespace BookApp.Composants;
|
|
|
|
public partial class ToggleSwitchView : ContentView
|
|
{
|
|
public ToggleSwitchView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
// Gestionnaire d'événements pour le changement d'état du switch
|
|
private void OnToggled(object sender, ToggledEventArgs e)
|
|
{
|
|
if (e.Value) // Si c'est ON
|
|
{
|
|
OnLabel.Opacity = 1;
|
|
OffLabel.Opacity = 0.25;
|
|
}
|
|
else // Si c'est OFF
|
|
{
|
|
OnLabel.Opacity = 0.25;
|
|
OffLabel.Opacity = 1;
|
|
}
|
|
}
|
|
} |