public void InitializeComponent()
 {
     if (!this._contentLoaded)
     {
         this._contentLoaded = true;
         Application.LoadComponent(this, new Uri("/TinyMoneyManager;component/loginPage.xaml", UriKind.Relative));
         this.LayoutRoot = (Grid) base.FindName("LayoutRoot");
         this.TitlePanel = (StackPanel) base.FindName("TitlePanel");
         this.ApplicationTitle = (TextBlock) base.FindName("ApplicationTitle");
         this.ContentPanel = (Grid) base.FindName("ContentPanel");
         this.PasswordToLogin = (TextBlock) base.FindName("PasswordToLogin");
         this.PasswordTextBoxRow = (Grid) base.FindName("PasswordTextBoxRow");
         this.PasswordTextBox = (TinyMoneyManager.Controls.PasswordTextBox) base.FindName("PasswordTextBox");
         this.OpenButton = (RoundButton) base.FindName("OpenButton");
         this.LastTimeAccess = (TextBlock) base.FindName("LastTimeAccess");
         this.FooterText = (TextBlock) base.FindName("FooterText");
     }
 }
 private void TextBoxFocus(object sender, RoutedEventArgs e)
 {
     temp = sender as PasswordTextBox;
 }
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            action = NavigationContext.QueryString["action"] ?? newPassword;

            if (action == newPassword)
            {
                this.viewModel = new NewPasswordViewModel(AppSetting.Instance);
                temp = this.NewPasswordTextBox;
            }
            else
            {
                this.viewModel = new ChangePasswordViewModel(AppSetting.Instance);
                temp = this.CurrentPasswordTextBox;
            }
            this.DataContext = viewModel;
        }