A button is considered inactive when it is not defaulted, does not have the keyboard focus, does not have the mouse over it, and is not pressed. The PopupButton also supports a transparency mode, which indicates that the background, borders, and/or shades should not be rendered when the button is inactive. Handlers for this event can customize the popup menu or content before it is displayed, or can choose to cancel the open altogether. In addition, the PopupOpening event will be raised before the associated ContextMenu/ Popup is opened. PopupOpened and PopupClosed events are raised when the associated ContextMenu/ Popup is opened and closed, respectively. ![]() The popup content can be automatically focused when opened by setting the IsAutoFocusOnOpenEnabled property to true, which is the default. Setting the PopupMenu property will trigger its ContextMenu to display, even of any of the popup content properties are set. The PopupMenu can be set to a ContextMenu that you'd like to display when the button is clicked.Īlternatively the PopupContent, PopupContentTemplate, and/or PopupContentTemplateSelector properties can be used to specify content for a popup to show instead. This display mode opens a popup/menu when clicked. ![]() The control will show the popup indicator, but not the content. If no popup content or menu is assigned to the control, clicks on the control will behave like a standard Button. This display mode renders the same as a normal Button, while still retaining popup display functionality when clicked. The control will show the content as a normal button, and with no popup indicator. It performs a standard button click when clicking the button's content area, and opens a popup/menu when the popup indicator area is clicked. This display mode is also known as a split button. The control will show the content in a normal button area and a popup indicator in a separate clickable area. This display mode is also known as a drop-down button and opens a popup/menu when clicked. The control will show the content as a normal button, with a popup indicator right next to the content. The control will show the content as a normal button, with a popup indicator on the right side. DisplayMode property supports these display modes, which alter the appearance of the control: DisplayMode The various PopupButton display modes Display Mode The PopupButton control supports display of popups or context menus and can render in multiple display modes.
0 Comments
Leave a Reply. |