Add click event to Button and checked changed event to CheckBox

This commit is contained in:
Stone_Red
2026-06-12 15:18:14 +02:00
parent f9cc016f01
commit 671c6413cf
2 changed files with 14 additions and 1 deletions
+7 -1
View File
@@ -4,10 +4,16 @@ namespace RemSox.UI.GUI.UIEelements.Controls;
public class CheckBox() : Control("CheckBox")
{
public event EventHandler? OnCheckedChanged;
public bool IsChecked
{
get;
set => SetProperty(nameof(IsChecked), ref field, value);
set
{
SetProperty(nameof(IsChecked), ref field, value);
OnCheckedChanged?.Invoke(this, EventArgs.Empty);
}
} = false;
public string Text