Class TwoButtonPopup
The TwoButtonPopup describe pop-up which has circular two button, title, text, and content area.
Inheritance
Namespace: Tizen.Wearable.CircularUI.Forms
Assembly: Tizen.Wearable.CircularUI.Forms.dll
Syntax
public class TwoButtonPopup : BindableObject
Examples
var leftButton = new MenuItem()
{
Text = "Save",
Icon = new FileImageSource{ File = "icon_save.png", },
Command = new Command(() => { ... })
};
var rightButton = new MenuItem()
{
Text = "Delete",
Icon = new FileImageSource{ File = "icon_delete.png", },
Command = new Command(() => { ... })
};
var popup = new TwoButtonPopup();
popup.FirstButton = leftButton;
popup.SecondButton = rightButton;
popup.Title = "Popup title";
popup.Content = new StackLayout()
{
HorizontalOptions = LayoutOptions.FillAndExpand,
Children =
{
new Label
{
Text = "Will be saved",
},
}
};
popup.BackButtonPressed += (s, e) =>
{
popup.Dismiss();
};
Constructors
TwoButtonPopup()
Creates and initializes a new instance of the TwoButtonPopup class.
Declaration
public TwoButtonPopup()
Fields
ContentProperty
BindableProperty. Identifies the content bindable property.
Declaration
public static readonly BindableProperty ContentProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
FirstButtonProperty
BindableProperty. Identifies the first button bindable property.
Declaration
public static readonly BindableProperty FirstButtonProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
SecondButtonProperty
BindableProperty. Identifies the second button bindable property.
Declaration
public static readonly BindableProperty SecondButtonProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
TextProperty
BindableProperty. Identifies the title bindable property.
Declaration
public static readonly BindableProperty TextProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
TitleProperty
BindableProperty. Identifies the title bindable property.
Declaration
public static readonly BindableProperty TitleProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
Properties
Content
Gets or sets content view of the Popup.
Declaration
public View Content { get; set; }
Property Value
| Type | Description |
|---|---|
| View |
FirstButton
Gets or sets left button of the Popup. Text property of MenuItem is ignored since button has no space to display text.
Declaration
public MenuItem FirstButton { get; set; }
Property Value
| Type | Description |
|---|---|
| MenuItem |
SecondButton
Gets or sets right button of the Popup. Text property of MenuItem is ignored since button has no space to display text.
Declaration
public MenuItem SecondButton { get; set; }
Property Value
| Type | Description |
|---|---|
| MenuItem |
Text
Gets or sets text of the Popup.
Declaration
public string Text { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Title
Gets or sets title of the Popup.
Declaration
public string Title { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
Dismiss()
Dismisses the TwoButtonPopup.
Declaration
public void Dismiss()
Show()
Shows the TwoButtonPopup.
Declaration
public void Show()
Events
BackButtonPressed
Occurs when the device's back button is pressed.
Declaration
public event EventHandler BackButtonPressed
Event Type
| Type | Description |
|---|---|
| System.EventHandler |