public static void FinishBinding(this PhoneApplicationPage instance) { var element = FocusManager.GetFocusedElement(); if (element is TextBox) { UpdateBinding((TextBox)element, TextBox.TextProperty); } else if (element is PasswordBox) { UpdateBinding((PasswordBox)element, PasswordBox.PasswordProperty); } instance.Focus(); }
void MoveViewWindow(double left) { viewMoved = true; if (applicationBar != null) { if (left == -350) { applicationBar.IsVisible = true; } else { applicationBar.IsVisible = false; } } currentPage.Focus(); moveAnimation.SkipToFill(); ((DoubleAnimation)moveAnimation.Children[0]).To = left; moveAnimation.Begin(); }