private void CancelClick(object sender, RoutedEventArgs e) { if (CancelClicked != null) { CancelClicked.Invoke(this, e); } }
private void btnCancel_Click(object sender, RoutedEventArgs e) { if (CancelClicked != null) { CancelClicked.Invoke(this, EventArgs.Empty); } }
private void btnCancel_Click(object sender, EventArgs e) { if (!_initialized) { return; } CancelClicked?.Invoke(this, new EventArgs()); }
private void OnCancelClicked() { Hide(); chooseButton.interactable = false; DeactiveAllSelectedClasses(); CancelClicked?.Invoke(); }
internal async void CancelClickedInternal() { CancelClicked?.Invoke(this, EventArgs.Empty); if (CancelCommand is not CancelSheetCommand) { IsOpen = false; return; } if (CancelCommand is CancelSheetCommand cancelSheetCommand && await cancelSheetCommand.CanCloseSheet(CancelCommandParameter)) { IsOpen = false; } }
public DatePickerView() { _datePicker = new BlankDatePicker { BackgroundColor = Color.Transparent }; Input = _datePicker; _datePicker.SetBinding(Entry.TextProperty, new Binding(nameof(EntryText)) { Source = this, Mode = BindingMode.TwoWay }); _datePicker.SetBinding(Entry.FontAttributesProperty, new Binding(nameof(EntryFontAttributes)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(Entry.FontFamilyProperty, new Binding(nameof(EntryFontFamily)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(Entry.FontSizeProperty, new Binding(nameof(EntryFontSize)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(Entry.PlaceholderProperty, new Binding(nameof(EntryPlaceholder)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(Entry.PlaceholderColorProperty, new Binding(nameof(EntryPlaceholderColor)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(Entry.HorizontalTextAlignmentProperty, new Binding(nameof(EntryHorizontalTextAlignment)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(Entry.TextColorProperty, new Binding(nameof(EntryTextColor)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(HeightRequestProperty, new Binding(nameof(EntryHeightRequest)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(MarginProperty, new Binding(nameof(EntryMargin)) { Source = this, Mode = BindingMode.OneWay }); //_datePicker.SetBinding(BlankDatePicker.FormatProperty, // new Binding(nameof(Format)) { Source = this, Mode = BindingMode.OneWay }); //_datePicker.SetBinding(BlankDatePicker.MinimumDateProperty, // new Binding(nameof(MinimumDate)) { Source = this, Mode = BindingMode.OneWay }); //_datePicker.SetBinding(BlankDatePicker.MaximumDateProperty, // new Binding(nameof(MaximumDate)) { Source = this, Mode = BindingMode.OneWay }); //_datePicker.SetBinding(BlankDatePicker.DateProperty, // new Binding(nameof(Date)) { Source = this, Mode = BindingMode.TwoWay }); _datePicker.SetBinding(IsEnabledProperty, new Binding(nameof(IsReadOnly)) { Source = this, Mode = BindingMode.OneWay, Converter = new InverseBooleanConverter() }); _datePicker.SetBinding(InputTransparentProperty, new Binding(nameof(IsReadOnly)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(HeightRequestProperty, new Binding(nameof(EntryHeightRequest)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(BlankDatePicker.DoneButtonTextProperty, new Binding(nameof(DoneButtonText)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(BlankDatePicker.CancelButtonTextProperty, new Binding(nameof(CancelButtonText)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(BlankDatePicker.UpdateModeProperty, new Binding(nameof(UpdateMode)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.Focused += FocusEntry; _datePicker.Unfocused += UnfocusEntry; _datePicker.DateSelected += Date_Selected; _datePicker.TextChanged += SendEntryTextChanged; _datePicker.DoneClicked += (sender, e) => DoneClicked?.Invoke(this, e); _datePicker.CancelClicked += (sender, e) => CancelClicked?.Invoke(this, e); FloatingLabelWithoutAnimation(); Children.Add(_datePicker, 2, 3, 1, 2); }
private void btnCancel_Click(object sender, RoutedEventArgs e) { CancelChanges(); CancelClicked?.Invoke(this, e); }
/// <summary> /// The on cancel clicked. /// </summary> public void OnCancelClicked() { CancelClicked?.Invoke(this, new RoutedEventArgs()); }
private void Button_cancel_Click(object sender, EventArgs e) { // fire the external event so the subscribed presenter can react CancelClicked?.Invoke(this, e); }
/// <summary> /// The button cancel_ click. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> private void OnCancelButtonClick(object sender, RoutedEventArgs e) { CancelClicked?.Invoke(this, new RoutedEventArgs()); }
private void OnCancelClicked() { CancelClicked?.Invoke(this, new EventArgs()); }
public void OnCancelClicked(object pSender, EventArgs pEventArgs) { CancelClicked?.Invoke(this, pEventArgs); DialogResult = DialogResult.Cancel; base.Close(); }
private void CancelTransfer_Click(object sender, EventArgs e) { CancelClicked?.Invoke(sender, e); }
private void OnCancel() { CancelClicked?.Invoke(this); }
public DatePickerView() { _datePicker = new BlankDatePicker { BackgroundColor = Color.Transparent, HorizontalOptions = LayoutOptions.FillAndExpand }; _datePicker.SetBinding(DatePicker.FontAttributesProperty, new Binding(nameof(EntryFontAttributes)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(DatePicker.FontFamilyProperty, new Binding(nameof(EntryFontFamily)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(DatePicker.FontSizeProperty, new Binding(nameof(EntryFontSize)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(BlankDatePicker.PlaceholderProperty, new Binding(nameof(EntryPlaceholder)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(BlankDatePicker.PlaceholderColorProperty, new Binding(nameof(EntryPlaceholderColor)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(BlankDatePicker.HorizontalTextAlignmentProperty, new Binding(nameof(EntryHorizontalTextAlignment)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(DatePicker.TextColorProperty, new Binding(nameof(EntryTextColor)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(HeightRequestProperty, new Binding(nameof(EntryHeightRequest)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(DatePicker.FormatProperty, new Binding(nameof(Format)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(DatePicker.MinimumDateProperty, new Binding(nameof(MinimumDate)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(DatePicker.MaximumDateProperty, new Binding(nameof(MaximumDate)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(DatePicker.DateProperty, new Binding(nameof(Date)) { Source = this, Mode = BindingMode.TwoWay }); _datePicker.SetBinding(BlankDatePicker.DoneButtonTextProperty, new Binding(nameof(DoneButtonText)) { Source = this, Mode = BindingMode.OneWay }); _datePicker.SetBinding(BlankDatePicker.CancelButtonTextProperty, new Binding(nameof(CancelButtonText)) { Source = this, Mode = BindingMode.OneWay }); _pFrame = new Frame { Padding = 0, HasShadow = false, BackgroundColor = Color.Transparent, Content = _datePicker }; _pFrame.SetBinding(IsEnabledProperty, new Binding(nameof(IsReadOnly)) { Source = this, Mode = BindingMode.OneWay, Converter = new InverseBooleanConverter() }); _pFrame.SetBinding(InputTransparentProperty, new Binding(nameof(IsReadOnly)) { Source = this, Mode = BindingMode.OneWay }); _pFrame.SetBinding(HeightRequestProperty, new Binding(nameof(EntryHeightRequest)) { Source = this, Mode = BindingMode.OneWay }); TextAlignmentCommand = new Command(() => TextAlignmentChanged()); _datePicker.Focused += FocusEntry; _datePicker.Unfocused += UnfocusEntry; _datePicker.DateSelected += Date_Selected; _datePicker.DoneClicked += (sender, e) => DoneClicked?.Invoke(this, e); _datePicker.CancelClicked += (sender, e) => CancelClicked?.Invoke(this, e); Children.Add(_pFrame, 2, 3, 1, 2); }
/// <summary> /// Helper functions to let renderers to fire the CancelClicked event /// </summary> public void FireCancelEvent() { CancelClicked?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Fires the Cancel Clicked event. /// </summary> protected virtual void OnCancelClicked() { CancelClicked?.Invoke(this, EventArgs.Empty); }
public PickerView() { _picker = new BlankPicker { BackgroundColor = Color.Transparent, }; _picker.SetBinding(Picker.FontAttributesProperty, new Binding(nameof(EntryFontAttributes)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(Picker.FontFamilyProperty, new Binding(nameof(EntryFontFamily)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(Picker.FontSizeProperty, new Binding(nameof(EntryFontSize)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(BlankPicker.PlaceholderProperty, new Binding(nameof(EntryPlaceholder)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(BlankPicker.PlaceholderColorProperty, new Binding(nameof(EntryPlaceholderColor)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(BlankPicker.HorizontalTextAlignmentProperty, new Binding(nameof(EntryHorizontalTextAlignment)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(Picker.TextColorProperty, new Binding(nameof(EntryTextColor)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(HeightRequestProperty, new Binding(nameof(EntryHeightRequest)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(Picker.ItemsSourceProperty, new Binding(nameof(ItemsSource)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(Picker.SelectedIndexProperty, new Binding(nameof(SelectedIndex)) { Source = this, Mode = BindingMode.TwoWay }); _picker.SetBinding(Picker.SelectedItemProperty, new Binding(nameof(SelectedItem)) { Source = this, Mode = BindingMode.TwoWay }); _picker.SetBinding(Picker.TitleProperty, new Binding(nameof(Title)) { Source = this, Mode = BindingMode.OneWay }); //Todo For Xamarin.Forms 4.0 //_picker.SetBinding(Picker.TitleColorProperty, //new Binding(nameof(TitleColor)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(BlankPicker.DoneButtonTextProperty, new Binding(nameof(DoneButtonText)) { Source = this, Mode = BindingMode.OneWay }); _picker.SetBinding(BlankPicker.CancelButtonTextProperty, new Binding(nameof(CancelButtonText)) { Source = this, Mode = BindingMode.OneWay }); _pFrame = new Frame { Padding = 0, HasShadow = false, BackgroundColor = Color.Transparent, Content = _picker }; _pFrame.SetBinding(IsEnabledProperty, new Binding(nameof(IsReadOnly)) { Source = this, Mode = BindingMode.OneWay, Converter = new InverseBooleanConverter() }); _pFrame.SetBinding(InputTransparentProperty, new Binding(nameof(IsReadOnly)) { Source = this, Mode = BindingMode.OneWay }); _pFrame.SetBinding(HeightRequestProperty, new Binding(nameof(EntryHeightRequest)) { Source = this, Mode = BindingMode.OneWay }); TextAlignmentCommand = new Command(() => TextAlignmentChanged()); _picker.Focused += FocusEntry; _picker.Unfocused += UnfocusEntry; _picker.SelectedIndexChanged += IndexChanged; _picker.DoneClicked += (sender, e) => DoneClicked?.Invoke(this, e); _picker.CancelClicked += (sender, e) => CancelClicked?.Invoke(this, e); Children.Add(_pFrame, 2, 3, 1, 2); }
private void BtnCancel_LeftClick(object sender, EventArgs e) { Hide(); CancelClicked?.Invoke(this, EventArgs.Empty); }
private void buttonCancel_Click(object sender, EventArgs e) { CancelClicked?.Invoke(sender, e); }
private void CancelSync() { CancelClicked?.Invoke(this, new EventArgs()); }
private void CancelButton_OnClick(object sender, RoutedEventArgs e) { CancelClicked?.Invoke(this, EventArgs.Empty); }
protected void btnCancel_Click(object sender, EventArgs e) { CancelClicked?.Invoke(sender, e); }
protected virtual void OnCancelClicked(EventArgs e) { CancelClicked?.Invoke(this, e); }
private void OnCancelClicked(object sender, EventArgs e) { CancelClicked?.Invoke(this, e); }