using Xui.Core.UI; using Xui.ToolKit.UI.Design; using Xui.ToolKit.UI.Widgets; public sealed class WidgetExample : Border { public WidgetExample() { var status = new Label { Text = "Sound is off.", FontFamily = "Inter", FontSize = 18, Margin = 8 }; var toggle = new Toggle { Id = "Widgets.Sound", Margin = 8, Changed = on => status.Text = on ? "Sound is on." : "Sound is off." }; var content = new VerticalStack { Margin = 24, Content = [new Card { Content = new Label { Text = "Make yourself at home.", FontFamily = "Inter", FontSize = 18 }, Margin = 8 }, status, toggle, new Button { Id = "Widgets.Reset", Text = "Reset", Variant = ButtonVariant.Outline, Margin = 8, Clicked = () => { toggle.IsOn = false; status.Text = "Sound is off."; } } ] }; Content = new DesignSystemView(content); } }