public static IIgniteGUIGroup AddToggleWithButton(this IIgniteGUIGroup group, string buttonName, Action <bool> onClick, Action <bool> onValueChanged = null, bool defaultValue = true) { var toggle = IgniteToggle.Create(onValueChanged ?? delegate { }, defaultValue); var horizontalGroup = IgniteHorizontalGroup.Create().Add(toggle).AddButton(buttonName, () => onClick(toggle.IsOn)) as IgniteHorizontalGroup; return(group.Add(horizontalGroup)); }
public static IIgniteGUIGroup AddToggle(this IIgniteGUIGroup group, Action <bool> onValueChanged, bool defaultValue = true) { return(group.Add(IgniteToggle.Create(onValueChanged, defaultValue))); }