136
|
Chapter 8: Controls
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
PasswordChar="*"
Password="MyPassword" />
<PasswordBox .../> implements a TextBox with special provisions for handling passwords.
Attributes
MaxLength (optional)
This attribute is an
Integer value specifying the maximum length of the pass-
word. A 0 indicates there is no maximum. The default value is 0.
Password (optional)
This attribute is a
SecureString representing the password to be displayed.
PasswordChar (optional)
This attribute is the
Char displayed in place of typed characters in the password
box. The default value is *.
PasswordTextChanged (optional)
This attribute describes the
codebehind handler that executes when the Password-
TextChanged
event is raised.
Events
PasswordTextChanged
Popup
Hierarchy: UIElement FrameworkElement
<Popup
Child="MyChild"
HasDropShadow="true|false"
HorizontalOffset="3"
IsOpen="true|false"
Placement="Absolute|AbsolutePoint|Top|Bottom|Right|Center|Left|Relative|
RelativePoint|Mouse|MousePoint"
PlacementRectangle="0,0 5 10"
PlacementTarget="Target"
PopupAnimation="None|Fade|Scroll|Slide"
StaysOpen="true|false"
VerticalOffset="5"
CustomPopupPlacementCallback="CustomCallback"
Opened="OpenedHandler"
Closed="ClosedHandler"
/>
<Popup .../> creates a top-level window that displays content. It is not affected by
styles or properties in the existing tree unless it is specifically bound to them.
Attributes
Child (optional)
This attribute sets the child element. Child elements can also be defined between
the tags.
Closed (optional)
This attribute sets the name of the
codebehind handler that executes when the
Popup is closed.
Popup | 137
Controls
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
CustomPopupPlacementCallback (optional)
This attribute identifies a
codebehind callback function, which returns the place-
ment for this element.
HasDropShadow (optional)
This attribute determines whether the
Popup has a drop shadow.
true
The element has a drop shadow.
false
The element does not have a drop shadow. This is the default.
HorizontalOffset (optional)
This attribute determines the offset of the
Popup from the left. It is of type Double.
IsOpen (optional)
This attribute determines whether the
Popup is visible.
true
The element is visible.
false
The element is not visible.
Opened (optional)
This attribute sets the name of the
codebehind handler that executes when the
Popup is opened.
Placement (optional)
This attribute determines where the
PopUp appears.
Absolute
Uses HorizontalOffset and VerticalOffset to position the Popup relative to
the upper-left corner of the screen.
AbsolutePoint
Uses HorizontalOffset and VerticalOffset to position the Popup relative to
the upper-left corner of the screen. If the
Popup extends beyond the edges of
the screen, it flips to the other side of the point.
Bottom
Positions the Popup on the bottom edge of its parent, aligning left edges.
Center
Centers the Popup over the parent.
Left
Positions the Popup on the left side of the parent, aligning upper edges.
Mouse
Behaves the same way as Bottom but uses the bounding box of the mouse
cursor.
MousePoint
Behaves the same way as RelativePoint, but its reference point is the tip of
the mouse cursor.
Relative
Uses HorizontalOffset and VerticalOffset to position the Popup relative to
the upper-left corner of the parent element.

Get XAML in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.