Skip to content

Commit 2746adb

Browse files
golf1052Trolldemorted
authored andcommitted
Bind VerificationCode TextBox to ViewModel
1 parent 97d2bf1 commit 2746adb

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Signal-Windows/ViewModels/RegisterFinalizationPageViewModel.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ namespace Signal_Windows.ViewModels
2222
public class RegisterFinalizationPageViewModel : ViewModelBase
2323
{
2424
public RegisterFinalizationPage View { get; set; }
25-
public string VerificationCode { get; set; }
25+
26+
private string _VerificationCode = string.Empty;
27+
public string VerificationCode
28+
{
29+
get { return _VerificationCode; }
30+
set { _VerificationCode = value; RaisePropertyChanged(nameof(VerificationCode)); }
31+
}
32+
2633
private SignalServiceAccountManager AccountManager;
2734
private string Password;
2835
private uint SignalRegistrationId;

Signal-Windows/Views/RegisterFinalizationPage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</Grid.RowDefinitions>
3434
<TextBlock Grid.Row="0" Foreground="White" FontSize="35" HorizontalAlignment="Center" Margin="20 20 20 20">Connect with Signal</TextBlock>
3535
<TextBlock Grid.Row="1" Foreground="White" HorizontalAlignment="Center">Please enter your SMS verification code below:</TextBlock>
36-
<TextBox Grid.Row="2" Width="200" />
36+
<TextBox Grid.Row="2" Width="200" Text="{x:Bind Vm.VerificationCode, Mode=TwoWay}" IsEnabled="{x:Bind Vm.UIEnabled, Mode=OneWay}"/>
3737
<Button Grid.Row="3" Background="White" Foreground="#2190EA" HorizontalAlignment="Center" Width="200" Margin="20 20 20 20" Click="FinishButton_Click" IsEnabled="{x:Bind Vm.UIEnabled, Mode=OneWay}">Finish Registration</Button>
3838
</Grid>
3939
</Page>

0 commit comments

Comments
 (0)