Class Popup
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
- API Level:
- preview
The Popup is a widget that is an enhancement of notify. In addition to content area, there are two optional sections, namely title area and action area.
public class Popup : Layout, IAccessibleObject
- Inheritance
- Implements
Constructors
View SourcePopup(EvasObject)
Creates and initializes a new instance of the Popup class.
Declaration
public Popup(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | The EvasObject to which the new popup will be attached as a child. |
API Level: preview
Properties
View SourceAlignmentX
Sets or gets the AlignmentX in which the popup will appear in its parent.
Declaration
public override double AlignmentX { get; set; }
Property Value
Type | Description |
---|---|
Double |
Overrides
API Level: preview
View SourceAlignmentY
Sets or gets the AlignmentY in which the popup will appear in its parent.
Declaration
public override double AlignmentY { get; set; }
Property Value
Type | Description |
---|---|
Double |
Overrides
API Level: preview
View SourceAllowEvents
Sets or gets whether events should be passed to the event blocked area by a click outside.
Declaration
public bool AllowEvents { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The visible region of the popup is surrounded by a translucent region called the Blocked event area.
API Level: preview
View SourceContentTextWrapType
Sets or gets the wrapping type of content text packed in the content area of Popup widget.
Declaration
public WrapType ContentTextWrapType { get; set; }
Property Value
Type | Description |
---|---|
WrapType |
Remarks
Popup need to wrap the content text, so not allowing WrapType.None.
API Level: preview
View SourceOpacity
Gets the opacity value of the popup.
Declaration
public override int Opacity { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
API Level: preview
View SourceOrientation
Sets or gets the position in which the popup will appear in its parent.
Declaration
public PopupOrientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
PopupOrientation |
API Level: preview
View SourceTimeout
Sets or gets the timeout value set to the popup (in seconds).
Declaration
public double Timeout { get; set; }
Property Value
Type | Description |
---|---|
Double |
Remarks
Since calling Show() on a popup restarts the timer controlling when it is hidden, setting this before the popup is shown, will in effect mean starting the timer when the popup is shown. TimedOut is called afterwards, which can be handled, if needed. Set a value <= 0.0 to disable a running timer. If the value is > 0.0 and the popup is previously visible, the timer will be started with this value, canceling any running timer.
API Level: preview
Methods
View SourceAppend(String)
Adds the label to a Popup widget.
Declaration
public PopupItem Append(string label)
Parameters
Type | Name | Description |
---|---|---|
String | label |
Returns
Type | Description |
---|---|
PopupItem | The new PopupItem which contains a label. |
API Level: preview
View SourceAppend(String, EvasObject)
Adds the Label and icon to a Popup widget.
Declaration
public PopupItem Append(string label, EvasObject icon)
Parameters
Type | Name | Description |
---|---|---|
String | label | The Label, which will be added into a new PopupItem. |
EvasObject | icon | The icon, which will be added into a new PopupItem. |
Returns
Type | Description |
---|---|
PopupItem | The new PopupItem, which contains the label and icon. |
API Level: preview
View SourceCreateHandle(EvasObject)
Creates a widget handle.
Declaration
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | Parent EvasObject. |
Returns
Type | Description |
---|---|
IntPtr | Handle IntPtr. |
Overrides
API Level: preview
View SourceDismiss()
Uses this function to dismiss the popup in hide effect. When the Popup is dismissed, the "dismissed" signal will be emitted.
Declaration
public void Dismiss()
API Level: preview
Events
View SourceDismissed
Dismissed will be triggered when the popup has been dismissed.
Declaration
public event EventHandler Dismissed
Event Type
Type | Description |
---|---|
EventHandler |
API Level: preview
View SourceOutsideClicked
OutsideClicked will be triggered when users taps on the outside of Popup.
Declaration
public event EventHandler OutsideClicked
Event Type
Type | Description |
---|---|
EventHandler |
API Level: preview
View SourceShowAnimationFinished
OutsideClicked will be triggered when the popup transition has finished in showing.
Declaration
public event EventHandler ShowAnimationFinished
Event Type
Type | Description |
---|---|
EventHandler |
API Level: preview
View SourceTimedOut
OutsideClicked will be triggered when the popup is closed as a result of timeout.
Declaration
public event EventHandler TimedOut
Event Type
Type | Description |
---|---|
EventHandler |