public static CheckBox CreateToggleSwitch(bool initialState)
		{
			ToggleSwitchView toggleView = new ToggleSwitchView("On".Localize(), "Off".Localize(),
				60, 24,
				ActiveTheme.Instance.PrimaryBackgroundColor,
				new RGBA_Bytes(220, 220, 220),
				ActiveTheme.Instance.PrimaryAccentColor,
				ActiveTheme.Instance.PrimaryTextColor);
			CheckBox toggleBox = new CheckBox(toggleView);
			toggleBox.Checked = initialState;
			return toggleBox;
		}
		public static CheckBox CreateToggleSwitch(bool initialState)
		{
			string on = "On";
			string off = "Off";
			if (StaticData.Instance != null)
			{
				on = on.Localize();
				off = off.Localize();
			}
			ToggleSwitchView toggleView = new ToggleSwitchView(on, off,
				60, 24,
				ActiveTheme.Instance.PrimaryBackgroundColor,
				new RGBA_Bytes(220, 220, 220),
				ActiveTheme.Instance.PrimaryAccentColor,
				ActiveTheme.Instance.PrimaryTextColor);
			CheckBox toggleBox = new CheckBox(toggleView);
			toggleBox.Checked = initialState;
			return toggleBox;
		}
示例#3
0
		private static CheckBox CreateCheckboxFromToggleSwitchView()
		{
			ToggleSwitchView toggleView = new ToggleSwitchView("On", "Off",
							60, 24,
							ActiveTheme.Instance.PrimaryBackgroundColor,
							new RGBA_Bytes(220, 220, 220),
							ActiveTheme.Instance.PrimaryAccentColor,
							ActiveTheme.Instance.PrimaryTextColor);
			CheckBox toggleBox = new CheckBox(toggleView);
			toggleBox.Checked = true;
			return toggleBox;
		}