BattlelogMobile.Client.View.MainPage.UpdateSource C# (CSharp) 메소드

UpdateSource() 개인적인 정적인 메소드

Workaround to update properties while typing
private static UpdateSource ( object sender ) : void
sender object
리턴 void
        private static void UpdateSource(object sender)
        {
            BindingExpression bindingExpression = null;
            var textBox = sender as TextBox;
            if (textBox != null)
            {
                bindingExpression = textBox.GetBindingExpression(TextBox.TextProperty);
            }
            else
            {
                var passwordBox = sender as PasswordBox;
                if (passwordBox != null)
                    bindingExpression = passwordBox.GetBindingExpression(PasswordBox.PasswordProperty);
            }

            if (bindingExpression != null)
                bindingExpression.UpdateSource();
        }