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)
102[assembly: StyleProperty("color", typeof(Switch), nameof(Switch.OnColorProperty))] 164[assembly: StyleProperty("-maui-thumb-color", typeof(Switch), nameof(Switch.ThumbColorProperty))]
Switch\Switch.cs (10)
11 public partial class Switch : View, IElementConfiguration<Switch>, ISwitch 19 public static readonly BindableProperty IsToggledProperty = BindableProperty.Create(nameof(IsToggled), typeof(bool), typeof(Switch), false, propertyChanged: (bindable, oldValue, newValue) => 21 ((Switch)bindable).Toggled?.Invoke(bindable, new ToggledEventArgs((bool)newValue)); 22 ((Switch)bindable).ChangeVisualState(); 28 public static readonly BindableProperty OnColorProperty = BindableProperty.Create(nameof(OnColor), typeof(Color), typeof(Switch), null, 35 public static readonly BindableProperty ThumbColorProperty = BindableProperty.Create(nameof(ThumbColor), typeof(Color), typeof(Switch), null); 51 readonly Lazy<PlatformConfigurationRegistry<Switch>> _platformConfigurationRegistry; 56 _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Switch>>(() => new PlatformConfigurationRegistry<Switch>(this)); 78 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))