I have to convert TextBox XAML to PasswordBox XAML. The main problem is <TextBox.Text>.
Any clue how it can be done?
Thank you!
<TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Name="tbxPassword" VerticalAlignment="Top" Width="277">
<TextBox.Text>
<Binding Path="Password" Source="{StaticResource ods}" UpdateSourceTrigger="PropertyChanged" >
<Binding.ValidationRules>
<c:ConfigValidationRule />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
If its really about password, you should use PasswordBox, Binding it to a dependency property would cause security vulnerabilities.
You can see the basic usage here
Password Box