21 references to Switch
Microsoft.Maui.Controls (21)
Hosting\AppHostBuilderExtensions.cs (1)
84 handlersCollection.AddHandler<Switch, SwitchHandler>();
PlatformConfiguration\TizenSpecific\Switch.cs (5)
6 using FormsElement = Maui.Controls.Switch; 12 public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(FormsElement), null); 27 public static Color GetColor(this IPlatformElementConfiguration<Tizen, FormsElement> config) 33 public static IPlatformElementConfiguration<Tizen, FormsElement> SetColor(this IPlatformElementConfiguration<Tizen, FormsElement> config, Color color)
Properties\AssemblyInfo.cs (4)
99[assembly: StyleProperty("color", typeof(Switch), nameof(Switch.OnColorProperty))] 161[assembly: StyleProperty("-maui-thumb-color", typeof(Switch), nameof(Switch.ThumbColorProperty))]
Switch\Switch.cs (10)
9 public partial class Switch : View, IElementConfiguration<Switch>, ISwitch 17 public static readonly BindableProperty IsToggledProperty = BindableProperty.Create(nameof(IsToggled), typeof(bool), typeof(Switch), false, propertyChanged: (bindable, oldValue, newValue) => 19 ((Switch)bindable).Toggled?.Invoke(bindable, new ToggledEventArgs((bool)newValue)); 20 ((Switch)bindable).ChangeVisualState(); 26 public static readonly BindableProperty OnColorProperty = BindableProperty.Create(nameof(OnColor), typeof(Color), typeof(Switch), null, 33 public static readonly BindableProperty ThumbColorProperty = BindableProperty.Create(nameof(ThumbColor), typeof(Color), typeof(Switch), null); 49 readonly Lazy<PlatformConfigurationRegistry<Switch>> _platformConfigurationRegistry; 54 _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Switch>>(() => new PlatformConfigurationRegistry<Switch>(this)); 76 public IPlatformElementConfiguration<T, Switch> On<T>() where T : IConfigPlatform
ViewExtensions.cs (1)
438 else if (element is Switch sw && bool.TryParse(text, out bool swResult))