private void CreateBindings() { // status Bar StatusLabel.SetBinding(ContentProperty, new Binding("Status") { Source = _statusBarModel, Mode = BindingMode.OneWay }); // settings BackgroundColorPicker.SetBinding(ColorPicker.SelectedColorProperty, new Binding("BackgroundColor") { Source = _settingsModel, Mode = BindingMode.TwoWay }); ForegroundColorPicker.SetBinding(ColorPicker.SelectedColorProperty, new Binding("ForegroundColor") { Source = _settingsModel, Mode = BindingMode.TwoWay }); ShowTransformationImageMenu.SetBinding(MenuItem.IsCheckedProperty, new Binding("ShowTransformationImage") { Source = _settingsModel, Mode = BindingMode.TwoWay }); ShowBlacklistedIconMenu.SetBinding(MenuItem.IsCheckedProperty, new Binding("ShowBlacklistedIcon") { Source = _settingsModel, Mode = BindingMode.TwoWay }); BlacklistedIconColorPicker.SetBinding(ColorPicker.SelectedColorProperty, new Binding("BlacklistedIconColor") { Source = _settingsModel, Mode = BindingMode.TwoWay }); }
public void BrowseSettingsPage_SizeChanged(object sender, EventArgs e) { Device.BeginInvokeOnMainThread(() => { ForegroundColorPicker.Unfocus(); BackgroundColorPicker.Unfocus(); FontFamilyPicker.Unfocus(); FontSizePicker.Unfocus(); ScrollbackBufferSizePicker.Unfocus(); }); Device.BeginInvokeOnMainThread(() => { ForegroundColorLabel.IsVisible = false; ForegroundColorLabel.IsVisible = true; ForegroundColorPicker.IsVisible = false; ForegroundColorPicker.IsVisible = true; Separator0.IsVisible = false; Separator0.IsVisible = true; BackgroundColorLabel.IsVisible = false; BackgroundColorLabel.IsVisible = true; BackgroundColorPicker.IsVisible = false; BackgroundColorPicker.IsVisible = true; Separator1.IsVisible = false; Separator1.IsVisible = true; FontFamilyLabel.IsVisible = false; FontFamilyLabel.IsVisible = true; FontFamilyPicker.IsVisible = false; FontFamilyPicker.IsVisible = true; Separator2.IsVisible = false; Separator2.IsVisible = true; FontSizeLabel.IsVisible = false; FontSizeLabel.IsVisible = true; FontSizePicker.IsVisible = false; FontSizePicker.IsVisible = true; Separator3.IsVisible = false; Separator3.IsVisible = true; ScrollbackBufferSizeLabel.IsVisible = false; ScrollbackBufferSizeLabel.IsVisible = true; ScrollbackBufferSizePicker.IsVisible = false; ScrollbackBufferSizePicker.IsVisible = true; Separator4.IsVisible = false; Separator4.IsVisible = true; KeepKeyboardVisibleLabel.IsVisible = false; KeepKeyboardVisibleLabel.IsVisible = true; KeepKeyboardVisibleSwitch.IsVisible = false; KeepKeyboardVisibleSwitch.IsVisible = true; Separator5.IsVisible = false; Separator5.IsVisible = true; }); }