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

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

				this.SelectedIndex = indexOfSelectedItem;
			}
		}