Compartilhar via


IXRPasswordBox (Compact 2013)

3/28/2014

This class represents a control for users to enter passwords.

Syntax

class IXRPasswordBox : public IXRControl

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRPasswordBox

Methods

Method

Description

IXRPasswordBox::AddPasswordChangedEventHandler

Attaches a delegate to the PasswordChanged event for this password box. When the password box raises the PasswordChanged event, the delegate is invoked.

IXRPasswordBox::GetCaretBrush

Retrieves the brush that is used to render the vertical bar that indicates the insertion point in this password box.

IXRPasswordBox::GetFontSource

Retrieves the font source that is applied to this password box for displaying content.

IXRPasswordBox::GetMaxLength

Retrieves the maximum length for passwords that this password box can accept.

IXRPasswordBox::GetPassword

Retrieves the password currently held by this password box.

IXRPasswordBox::GetPasswordChar

Retrieves the masking character for this password box.

IXRPasswordBox::GetSelectionBackground

Retrieves the brush used to paint the background for the selected text in this password box.

IXRPasswordBox::GetSelectionForeground

Retrieves the brush used to paint the selected text in this password box.

IXRPasswordBox::RemovePasswordChangedEventHandler

Removes a delegate from the PasswordChanged event for this password box.

IXRPasswordBox::SelectAll

Selects all the characters in this password box.

IXRPasswordBox::SetCaretBrush

Sets the brush that is used to render the vertical bar that indicates the insertion point in this password box.

IXRPasswordBox::SetFontSource

Sets the font source that is applied to this password box for displaying content.

IXRPasswordBox::SetMaxLength

Sets the maximum length for passwords that this password box can accept.

IXRPasswordBox::SetPassword

Sets the password for this password box to hold.

IXRPasswordBox::SetPasswordChar

Sets the masking character for this password box.

IXRPasswordBox::SetSelectionBackground

Sets the brush used to paint the background for the selected text in this password box.

IXRPasswordBox::SetSelectionForeground

Sets the brush used to paint the selected text in this password box.

Thread Safety

Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

A user can enter a single line of non-wrapping content in an IXRPasswordBox control. The user cannot view the entered text; only password characters that represent the text - referred to as masking characters - are displayed. You can specify the masking character by using IXRPasswordBox::SetPasswordChar.

The content displayed in this password box control is the string that can be accessed through IXRPasswordBox::GetPassword.

To provide labels for a password box, use the IXRTextBlock control.

When you create a class instance, use an IXRPasswordBoxPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

You can also define a password-box control in Microsoft Silverlight 3 XAML. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this element in the source XAML for your application, see the PasswordBox Class on MSDN.

.NET Framework Equivalent

System.Windows.Controls.PasswordBox

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for UI Element Management