public LockScreenSettingsPage(CustomSettingsPage<MainSettings> page) { _page = page; _page.OnApplySettings += (sender, settings) => OnApplySettings(settings); // selection for lockscreen plugin this.AddElement( new TextElement("Lock screen plugin") { Size = new Size(SettingsConsts.MaxWidth, 50), } ); _lockScreenTypeCombo = new ComboBox { Size = new Size(SettingsConsts.MaxWidth, 50), }; FillLockScreenTypes(); _lockScreenTypeCombo.SelectedIndexChanged += (s, e) => ChangeLockScreenType(); // urgent! after filling this.AddElement(_lockScreenTypeCombo); this.AddElement(new Separator()); // add current lockscreen settings _settingsPanel = new StackPanel(); this.AddElement(_settingsPanel); ChangeLockScreenType(); }
public MainSettingsPage(CustomSettingsPage<MainSettings> page) { _page = page; _page.OnApplySettings += (sender, settings) => OnApplySettings(settings); //!!Size = new Size(Size.Width - SettingsConsts.PaddingHor * 2, 1); // intro var txtIntro = new TextElement( "Change your phone's background and accent color to match your mood today, this week, or all month.".Localize()) { Size = new Size(this.Size.Width - 10, 50), Style = new TextStyle(MetroTheme.PhoneFontFamilyNormal, MetroTheme.PhoneFontSizeSmall, MetroTheme.PhoneForegroundBrush), AutoSizeMode = TextElement.AutoSizeModeOptions.WrapText, }; this.AddElement(txtIntro); this.AddElement(new Separator()); // light/dark theme switcher var ctrTheme = new SelectSettingsControl { Caption = "Theme".Localize(), Items = new List<object> { "dark".Localize(), "light".Localize() }, }; this.AddElement(ctrTheme); _page.BindingManager.Bind(this, "ThemeIndex", ctrTheme, "SelectedIndex", true); this.AddElement(new Separator()); // accent color var ctrAccent = new ColorSettingsControl(false) { Caption = "Accent Color".Localize(), }; this.AddElement(ctrAccent); _page.BindingManager.Bind(this, "AccentColor", ctrAccent, "Value", true); this.AddElement(new Separator()); // theme background var ctrThemeImage = new ImageSettingsControl { Caption = "Theme background".Localize(), }; this.AddElement(ctrThemeImage); _page.BindingManager.Bind(_page.Settings, "ThemeImage", ctrThemeImage, "Value", true); this.AddElement(new Separator()); // full screen var ctrFullScreen = new FlagSettingsControl() { Caption = "Full screen".Localize(), }; this.AddElement(ctrFullScreen); _page.BindingManager.Bind(_page.Settings, "FullScreen", ctrFullScreen, "Value", true); this.AddElement(new Separator()); // tile screen style var ctrTileTheme = new SelectSettingsControl { Caption = "Tiles style".Localize(), Items = new List<object> { "Windows Phone 7", "Windows 8" }, }; this.AddElement(ctrTileTheme); _page.BindingManager.Bind(_page.Settings, "TileThemeIndex", ctrTileTheme, "SelectedIndex", true); this.AddElement(new Separator()); }