Class SimplePopupDialog
Represents a simple popup dialog with a title, dialog content, and optional action buttons.
public class SimplePopupDialog : BaseContentView, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, ILayout, ILayoutController, IVisualTreeElement, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout, IRaiseSystemColorsChanged
- Inheritance
-
SimplePopupDialog
- Implements
- Derived
Constructors
- SimplePopupDialog()
Initializes a new instance of the SimplePopupDialog class.
Fields
- DefaultAlignedOrigin
Represents the default alignment origin for SimplePopupDialog.
- DefaultAlignedPosition
Represents the default horizontal and vertical alignment for SimplePopupDialog.
- DefaultBackColor
Gets or sets the default background color for the dialog in light and dark themes.
- DefaultPlaceholderColor
Gets or sets the default placeholder text color for the input field.
- DefaultTextColor
Gets or sets the default text color for the dialog in light and dark themes.
Properties
- Alignment
Gets or sets the alignment of the dialog within its parent layout.
- Buttons
Gets the toolbar containing the action buttons of the dialog.
- CancelButton
Gets the 'Cancel' button of the dialog.
- CancelButtonAction
Gets or sets the action to be executed when the "Cancel" button is pressed.
- CloseWhenCancelButtonClicked
Gets or sets a value indicating whether the dialog should close when the 'Cancel' button is clicked.
- CloseWhenOkButtonClicked
Gets or sets a value indicating whether the dialog should close when the 'OK' button is clicked.
- ContentLayout
Gets the layout containing the content of the dialog.
- DialogBorder
Gets the border of the dialog.
- DialogLayout
Gets the layout containing the entire dialog.
- DialogTitle
Gets the title view of the dialog.
- FocusOwnerAfterClose
Gets or sets a value indicating whether the owner control should be focused after the dialog is closed.
- NeedCancelButton
Gets a value indicating whether the "Cancel" button is required.
- NeedOkButton
Gets a value indicating whether the "OK" button is required.
- OkButton
Gets the 'Ok' button of the dialog.
- OkButtonAction
Gets or sets the action to be executed when the "OK" button is pressed.
- Owner
Gets or sets the owner of the dialog.
- Title
Gets or sets the title of the dialog.
Methods
- AddCancelButton()
Adds a "Cancel" button to the dialog if one does not already exist.
- AddOkButton()
Adds an "OK" button to the dialog if one does not already exist.
- CreateDialogBorder()
Creates a dialog border with predefined styling.
- CreateDialogTitle()
Creates and returns a new instance of SimpleDialogTitleView.
- CreateEntryBorder()
Creates a new Border instance for the entry views configured with default styling.
- GetBackColor()
Gets the background color of the dialog based on the current theme.
- GetBorderColor()
Gets the border color of the dialog based on the current theme.
- GetLabelMargin()
Calculates the margin to be applied to a dialog label.
- GetPlaceholderColor()
Gets the placeholder color for the dialog based on the current theme
- GetTextColor()
Gets the foreground color of the dialog based on the current theme.
- HideDialogs(VisualElement?, Type?)
Hides all instances of SimplePopupDialog within the specified container.
- OnCancelButtonClicked(DialogCloseAction)
Handles the event when the 'Cancel' button is clicked, 'X' button in the top-right corner of the dialog title is clicked or 'Escape' key is pressed.
- OnOkButtonClicked(DialogCloseAction)
Handles the event when the 'Ok' button is clicked or 'Enter' key is pressed.
- OnParentChanged()
When overridden in a derived class, should raise the ParentChanged event.
- OnParentSizeChanged(object?, EventArgs)
Handles the event when the size of the parent element changes.
- OnPropertyChanged(string?)
Method that is called when a bound property is changed.
- OnUpdatePosition()
Updates the position of the dialog based on its alignment within the parent layout.
- RaiseSystemColorsChanged()
Updates visual style of the control when the system colors are changed.
- ResetColors()
Resets the colors of the dialog based on the current theme (light or dark).
- SetAbsolutePosition(AbsoluteLayout, double, double)
Sets the absolute position of the dialog within the specified layout.
- SetAlignedPosition(object?, HorizontalAlignment, VerticalAlignment, AlignOrigin)
Sets the aligned position of the dialog within the specified layout using the provided alignment.
- SetAlignedPosition(object?, HVAlignment?, AlignOrigin)
Sets the aligned position of the dialog within the specified layout using the provided alignment.
Events
- CancelButtonClicked
Occurs when the "Cancel" button is clicked.
- OkButtonClicked
Occurs when the "OK" button is clicked.