I am using one user control which has it's password property. To set that password property i am using DependencyProperty created in viewmodel. When I am running application and trying to debug using Snoop tool(SnoopWpf), and when i look into user control properties it shows the password set for that control. I want to prevent snoop tool to show password property value. Is there any way we can add security to perticular dependency property?
XAML Code:
<class:MyControl x:Name="myControl" IsReadOnly="True"
CtlPassword="{Binding myPassword, Mode=OneWay}"
</class:MyControl>
private static DependencyProperty PasswordProperty = DependencyProperty.Register("myPassword", typeof(String), typeof(myControl), new PropertyMetadata(null));
public String myPassword
{
get { return (String)GetValue(PasswordProperty); }
set { SetValue(PasswordProperty, value); }
}
I looked into this link for one of the solution - Snoop proof solution Can we add any security to this myPassword property? Which will hide this property from any debugging tool