Skip to content

Commit

Permalink
Playing with trying to get the UserName TextBox to update on text cha…
Browse files Browse the repository at this point in the history
…nge, rather than when lost focus.
  • Loading branch information
gep13 committed Aug 2, 2012
1 parent c9ec7db commit 1b11a7a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,14 @@ public void UsernameActionIconTapped()
this.UserName = string.Empty;
}

/// <summary>
/// Helper method to
/// </summary>
public void UserNameTextChanged()
{
this.NotifyOfPropertyChange(() => this.UserName);
}

/// <summary>
/// Helper method to do the work when the ActionIcon is tapped on the Password Textbox
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@

<toolkit:PhoneTextBox x:Name="UsernameText"
LengthIndicatorVisible="False"
HidesActionItemWhenEmpty="True"
Margin="-10,-5,-10,8"
InputScope="EmailUserName"
ActionIcon="/Resources/Images/clearboxicon.png"
Expand All @@ -73,6 +74,9 @@
<i:EventTrigger EventName="ActionIconTapped">
<cal:ActionMessage MethodName="UsernameActionIconTapped" />
</i:EventTrigger>
<i:EventTrigger EventName="TextChanged">
<cal:ActionMessage MethodName="UserNameTextChanged" />
</i:EventTrigger>
</i:Interaction.Triggers>
</toolkit:PhoneTextBox>

Expand All @@ -81,6 +85,7 @@
Margin="0" />
<toolkit:PhoneTextBox x:Name="PasswordText"
LengthIndicatorVisible="False"
HidesActionItemWhenEmpty="True"
Margin="-10,-5,-10,8"
InputScope="EmailUserName"
ActionIcon="/Resources/Images/clearboxicon.png"
Expand Down

0 comments on commit 1b11a7a

Please sign in to comment.