コード例 #1
0
ファイル: EditAccount.xaml.cs プロジェクト: MatijaLevai/Kurir
        protected override async void OnAppearing()
        {
            string            mail = Application.Current.Properties["Mail"].ToString();
            RegisterUserModel user = await _connection.Table <RegisterUserModel>().Where(u => u.Mail == mail).FirstAsync();

            if (user != null)
            {
                this.BindingContext = user;
                FirstName.SetBinding(Entry.TextProperty, new Binding()
                {
                    Source = BindingContext, Path = "FirstName"
                });
                LastName.SetBinding(Entry.TextProperty, new Binding()
                {
                    Source = BindingContext, Path = "LastName"
                });
                Phone.SetBinding(Entry.TextProperty, new Binding()
                {
                    Source = BindingContext, Path = "Phone"
                });
                Mail.SetBinding(Entry.TextProperty, new Binding()
                {
                    Source = BindingContext, Path = "Mail"
                });
                Pass.SetBinding(Entry.TextProperty, new Binding()
                {
                    Source = BindingContext, Path = "Pass"
                });
                PassConfirm.SetBinding(Entry.TextProperty, new Binding()
                {
                    Source = BindingContext, Path = "PassConfirm"
                });
            }
            base.OnAppearing();
        }
コード例 #2
0
 private void PasswordWatermarkConfirm_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     PasswordWatermarkConfirm.Visibility = Visibility.Collapsed;
     PassConfirm.Focus();
 }