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));
     }
 }
Ejemplo n.º 3
0
		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);
		}
Ejemplo n.º 4
0
		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);
		}
Ejemplo n.º 5
0
        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;
            }
        }
Ejemplo n.º 6
0
        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);
			}
        }
Ejemplo n.º 8
0
 void HandleSubject(object sender, Xamarin.Forms.FocusEventArgs e)
 {
 }
Ejemplo n.º 9
0
 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;
 }
Ejemplo n.º 12
0
 void Entry_Focused(System.Object sender, Xamarin.Forms.FocusEventArgs e)
 {
     isEntryFocused = true;
 }
Ejemplo n.º 13
0
 void DatePicker_Unfocused(object sender, Xamarin.Forms.FocusEventArgs e)
 {
     LblDate.Text = datePicker.Date.ToString("MMM dd, yyyy");
 }
Ejemplo n.º 14
0
 void Handle_Unfocused_Email(object sender, Xamarin.Forms.FocusEventArgs e)
 {
     validateEmail();
     initialEntry = false;
 }
Ejemplo n.º 15
0
 async void Label_Focused(System.Object sender, Xamarin.Forms.FocusEventArgs e)
 {
     await DisplayAlert("Alert", "You have been alerted", "OK");
 }
Ejemplo n.º 16
0
        void HandleEvent(object sender, Xamarin.Forms.FocusEventArgs e)
        {
            var entry = sender as Entry;

            entry.BackgroundColor = (e.IsFocused) ? Color.Yellow : Color.Default;
        }
Ejemplo n.º 17
0
 void Image_Focused(System.Object sender, Xamarin.Forms.FocusEventArgs e)
 {
 }
Ejemplo n.º 18
0
		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);
		}
Ejemplo n.º 19
0
 void NumberInput3_Focused(object sender, FocusEventArgs e)
 {
     if(!CorrectInput ())
         numberInput3.Text = string.Empty;
 }
Ejemplo n.º 20
0
 void HandlePickerFocused(object sender, FocusEventArgs focusEventArgs)
 {
     MessagingCenter.Send(this, "ShowModal");
 }
Ejemplo n.º 21
0
 void ProjectPicker_Unfocused(object sender, Xamarin.Forms.FocusEventArgs e)
 {
 }
Ejemplo n.º 22
0
 public void EntryEmail_UnFocused(System.Object sender, Xamarin.Forms.FocusEventArgs e)
 => ViewModel.SaveAccountCommand.Execute(true);
Ejemplo n.º 23
0
 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));
 }
Ejemplo n.º 25
0
 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;
 }
Ejemplo n.º 27
0
 /*
 * 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);
 }
Ejemplo n.º 28
0
 void Entry_Unfocused(System.Object sender, Xamarin.Forms.FocusEventArgs e)
 {
     isEntryFocused         = false;
     (sender as Entry).Text = string.Empty;
 }
Ejemplo n.º 29
0
 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();
        //}
 }
Ejemplo n.º 30
0
 void Handle_Unfocused(object sender, Xamarin.Forms.FocusEventArgs e)
 {
 }
Ejemplo n.º 31
0
 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;
        }
Ejemplo n.º 34
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;
        }
Ejemplo n.º 37
0
 private void Entry_Focused(object sender, Xamarin.Forms.FocusEventArgs e)
 {
 }
Ejemplo n.º 38
0
 void Handle_Focused(object sender, Xamarin.Forms.FocusEventArgs e)
 {
     (sender as Entry).Text = "";
 }
Ejemplo n.º 39
0
 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")}";
 }
Ejemplo n.º 40
0
 void Handle_Focused(object sender, Xamarin.Forms.FocusEventArgs e)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 41
0
 void Handle_Focused(object sender, Xamarin.Forms.FocusEventArgs e)
 {
     CustomNavigationBarVM.MenuIcon = "back.png";
     Navigation.PushAsync(new SearchPage());
 }
Ejemplo n.º 42
0
 async void EntryUnfocused(object sender, Xamarin.Forms.FocusEventArgs e)
 {
     //await service.SendEmail(firstName.Text, lastName.Text, phoneNumber.Text, emailAddress.Text);
 }
Ejemplo n.º 43
0
		void OnFocused(object sender, FocusEventArgs e)
		{
			if(this.SelectedItem != null){
				var indexOfSelectedItem = ItemsSource.IndexOf(this.SelectedItem);

				this.SelectedIndex = indexOfSelectedItem;
			}
		}