コード例 #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;
         }
     }
 }
コード例 #3
0
        protected override bool IsPasswordCore()
        {
            AutomationPeer wrapperPeer = this.GetWrapperPeer();

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