void StyledEntry_Focused (object sender, FocusEventArgs e) { if (currentStatus > maxStatus) { currentStatus = 0; } layout.Children.Remove ((Entry)sender); switch (currentStatus) { case 0: styledEntry = new Entry { Placeholder = "Username" }; break; case 1: styledEntry = new Entry { Text = "Password", IsPassword = true }; break; case 2: styledEntry = new Entry { Placeholder = "Password", IsPassword = true }; break; case 3: styledEntry = new Entry { TextColor = Color.FromHex ("#77d065"), Text = "Xamarin Green" }; break; case 4: styledEntry = new Entry { BackgroundColor = Color.FromHex ("#2c3e50"), TextColor = Color.White, Text = "White on blue background" }; break; } styledEntry.Focused += StyledEntry_Focused; layout.Children.Add (styledEntry); currentStatus++; }
void OnEditorUnfocused(object sender, FocusEventArgs args) { if (Device.OS == TargetPlatform.iOS) { AbsoluteLayout.SetLayoutBounds(editor, new Rectangle(0, 0, 1, 1)); } }
void OnKeyboardDisappeared(object sender, FocusEventArgs e) { double yPosition = this.masterLayout.Height - (layoutButtonHolder.Height + gridBackground.Height); var newBounds = new Rectangle (originalButtonLayoutBounds.X, yPosition, layoutButtonHolder.Width, layoutButtonHolder.Height); layoutButtonHolder.LayoutTo (newBounds, 180, Easing.Linear); scrollView.ScrollToAsync (0, 0, true); }
void OnKeyboardAppeared(object sender, FocusEventArgs e) { var yPosition = gridPassword.Y + gridPassword.Height + 10; var newBounds = new Rectangle (originalButtonLayoutBounds.X, yPosition, layoutButtonHolder.Width, layoutButtonHolder.Height); layoutButtonHolder.LayoutTo (newBounds, 180, Easing.Linear); scrollView.ScrollToAsync (0, gridUserName.Y, true); }
void HandleFeedback(object sender, Xamarin.Forms.FocusEventArgs e) { var text = Feedback.Text; var placeHolderText = (string)Resources["FeedbackPlaceholder"]; if (Feedback.Text == placeHolderText) { Feedback.Text = string.Empty; Feedback.TextColor = (Color)Resources["InputTextColor"]; return; } if (Feedback.Text == string.Empty) { Feedback.Text = placeHolderText; Feedback.TextColor = (Color)Resources["InputPlaceholderColor"]; return; } }
async void TipoDocumento_Focused(object sender, Xamarin.Forms.FocusEventArgs e) { #if __IOS__ DependencyService.Get <IForceKeyboardDismissalService>().DismissKeyboard(); #endif var result = await UserDialogs.Instance.ActionSheetAsync("Numero de socio Win", "CANCELAR", null, null, "DNI", "LE", "LC", "CI"); if (result != "CANCELAR") { TipoDocumento.Text = result.ToString(); TipoDocumento.Unfocus(); DependencyService.Get <IForceKeyboardDismissalService>().DismissKeyboard(); } else { TipoDocumento.Unfocus(); DependencyService.Get <IForceKeyboardDismissalService>().DismissKeyboard(); } }
void NewCommentEntry_Focused (object sender, FocusEventArgs e) { //commentsAndInputs.TranslationY = newCommentEntry.Y - 180; if (Comments != null && Comments.Count <= 2) { masterLayout.TranslationY = masterLayout.Y - Device.OnPlatform(250, 220, 220); // fine upto 2 comments // 180 - gionee } else if (Comments != null && Comments.Count > 2) { masterLayout.TranslationY = masterLayout.Y - Device.OnPlatform(275, 245, 245); } }
void HandleSubject(object sender, Xamarin.Forms.FocusEventArgs e) { }
void EndsTime_Unfocused(object sender, Xamarin.Forms.FocusEventArgs e) { SaveRecord(); }
void Handle_Focused(object sender, Xamarin.Forms.FocusEventArgs e) { var entry = sender as Entry; ColorEntry(entry); }
void datepicker_Unfocused(System.Object sender, Xamarin.Forms.FocusEventArgs e) { backgroundBoxView.IsVisible = false; }
void Entry_Focused(System.Object sender, Xamarin.Forms.FocusEventArgs e) { isEntryFocused = true; }
void DatePicker_Unfocused(object sender, Xamarin.Forms.FocusEventArgs e) { LblDate.Text = datePicker.Date.ToString("MMM dd, yyyy"); }
void Handle_Unfocused_Email(object sender, Xamarin.Forms.FocusEventArgs e) { validateEmail(); initialEntry = false; }
async void Label_Focused(System.Object sender, Xamarin.Forms.FocusEventArgs e) { await DisplayAlert("Alert", "You have been alerted", "OK"); }
void HandleEvent(object sender, Xamarin.Forms.FocusEventArgs e) { var entry = sender as Entry; entry.BackgroundColor = (e.IsFocused) ? Color.Yellow : Color.Default; }
void Image_Focused(System.Object sender, Xamarin.Forms.FocusEventArgs e) { }
async void OnEmailEntered(object sender, FocusEventArgs e) { // Check for a valid email address string email = ((Entry)sender).Text; Regex regex = new Regex (@"^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$"); Match match = regex.Match (email); if (match.Success) { string domain = email.Substring(email.IndexOf('@') + 1).ToLower(); // Check if the email typed in has an associated AAD tenant, and show the sign in button if so if (GraphHelper.isAADDomain (domain)) { _AADSignInButton.FadeTo (1, 400); return; } } _AADSignInButton.FadeTo (0, 400); }
void NumberInput3_Focused(object sender, FocusEventArgs e) { if(!CorrectInput ()) numberInput3.Text = string.Empty; }
void HandlePickerFocused(object sender, FocusEventArgs focusEventArgs) { MessagingCenter.Send(this, "ShowModal"); }
void ProjectPicker_Unfocused(object sender, Xamarin.Forms.FocusEventArgs e) { }
public void EntryEmail_UnFocused(System.Object sender, Xamarin.Forms.FocusEventArgs e) => ViewModel.SaveAccountCommand.Execute(true);
void TimePicker_Unfocused(object sender, Xamarin.Forms.FocusEventArgs e) { LblTime.Text = $"{timePicker.Time.Hours} hrs : {timePicker.Time.Minutes} min"; }
private void txt_Focused(object sender, Xamarin.Forms.FocusEventArgs e) { Aplicacao.MostrarLabel(true, ((Entry)sender)); }
private void EntryFocused(object sender, Xamarin.Forms.FocusEventArgs e) { erroMsg.TextColor = Color.Transparent; loginGrid.TranslateTo(0, -40, 400, Easing.SinIn); }
void Handle_Focused(object sender, Xamarin.Forms.FocusEventArgs e) { hashtagsListStackLayout.IsVisible = true; randomPicturesStackLayout.IsVisible = false; }
/* * Called when text editor is not focused, removes keyboard and scrolls to height */ private async void TextEditor_Focused(object sender, FocusEventArgs e) { await Task.Delay(300); ScrolltoBottom(false); }
void Entry_Unfocused(System.Object sender, Xamarin.Forms.FocusEventArgs e) { isEntryFocused = false; (sender as Entry).Text = string.Empty; }
private void TaxonEditor_Focused(object sender, FocusEventArgs e) { var thisEditor = sender as Editor; ViewCell viewCell = (ViewCell)thisEditor.Parent.Parent.Parent; if (thisEditor.IsFocused) { thisEditor.BackgroundColor = Color.Accent; viewCell.ForceUpdateSize(); } //if (thisEditor.HeightRequest < 90) { // thisEditor.HeightRequest += 100; // viewCell.ForceUpdateSize(); //} }
void Handle_Unfocused(object sender, Xamarin.Forms.FocusEventArgs e) { }
public void Focused_Handler(object sender, Xamarin.Forms.FocusEventArgs e) { EntryRemarks.Text = ""; }
void OnUnfocusedSearchBar(object sender, Xamarin.Forms.FocusEventArgs e) { SearchCommand(null); }
void NewCommentEntry_Unfocused (object sender, FocusEventArgs e) { //commentsAndInputs.TranslationY = 0; masterLayout.TranslationY = 0; }
private void EntrUnFocused(object sender, Xamarin.Forms.FocusEventArgs e) { loginGrid.TranslateTo(0, 0, 400, Easing.SinIn); }
private void ViewOnUnfocused(object sender, FocusEventArgs focusEventArgs) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("update")); }
private void View_Focused(object sender, Xamarin.Forms.FocusEventArgs e) { var view = (sender as Entry); view.TextColor = Color.Green; }
private void Entry_Focused(object sender, Xamarin.Forms.FocusEventArgs e) { }
void Handle_Focused(object sender, Xamarin.Forms.FocusEventArgs e) { (sender as Entry).Text = ""; }
void Handle_Unfocused(object sender, Xamarin.Forms.FocusEventArgs e) { (this.BindingContext as OrdonnanceCreateEditViewModel).Ordonnance.First_Care_At = App.ConvertToUnixTimestamp((sender as DatePicker).Date); SelectedDate.Text = $"Premier soin: {(sender as DatePicker).Date.ToString("dd-MM-yyyy")}"; }
void Handle_Focused(object sender, Xamarin.Forms.FocusEventArgs e) { throw new NotImplementedException(); }
void Handle_Focused(object sender, Xamarin.Forms.FocusEventArgs e) { CustomNavigationBarVM.MenuIcon = "back.png"; Navigation.PushAsync(new SearchPage()); }
async void EntryUnfocused(object sender, Xamarin.Forms.FocusEventArgs e) { //await service.SendEmail(firstName.Text, lastName.Text, phoneNumber.Text, emailAddress.Text); }
void OnFocused(object sender, FocusEventArgs e) { if(this.SelectedItem != null){ var indexOfSelectedItem = ItemsSource.IndexOf(this.SelectedItem); this.SelectedIndex = indexOfSelectedItem; } }