public SelectSettingsControl() { _lblCaption = new TextElement("<select parameter>") { Size = new Size(SettingsConsts.MaxWidth, 50), }; AddElement(_lblCaption); _comboSelect = new ComboBox { Size = new Size(SettingsConsts.MaxWidth, 50), }; _comboSelect.SelectedIndexChanged += (s, e) => NotifyPropertyChanged("SelectedIndex"); AddElement(_comboSelect); }
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(); }