示例#1
0
 bool CheckPasswordElement(UIElement targetElement)
 {
     if (targetElement != null)
     {
         AutomationPeer automationPeer = GetAutomationPeer(targetElement);
         return((automationPeer != null) ? automationPeer.IsPassword() : false);
     }
     return(false);
 }
示例#2
0
 void CollectValue(Dictionary <string, string> properties, AutomationPeer automation)
 {
     if (automation.IsPassword())
     {
         properties["Value"] = "*";
     }
     else
     {
         IValueProvider valueProvider = automation.GetPattern(PatternInterface.Value) as IValueProvider;
         if (valueProvider != null)
         {
             properties["Value"] = valueProvider.Value;
         }
     }
 }
        protected override bool IsPasswordCore()
        {
            AutomationPeer wrapperPeer = this.GetWrapperPeer();

            return((wrapperPeer != null) && (wrapperPeer.IsPassword()));
        }