This is ACR patch to make Dialog APIs public.
This pull request includes properties and methods of DialogPage, Dialog,
AlertDialog and AlertDialogStyle classes.
/// <summary>
/// AlertDialog class shows a dialog with title, message and action buttons.
/// </summary>
/// <summary>
/// AlertDialog class shows a dialog with title, message and action buttons.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class AlertDialog : Control
{
private string title = null;
public class AlertDialog : Control
{
private string title = null;
/// <summary>
/// Creates a new instance of AlertDialog.
/// </summary>
/// <summary>
/// Creates a new instance of AlertDialog.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public AlertDialog() : base()
{
Initialize();
}
/// <summary>
public AlertDialog() : base()
{
Initialize();
}
/// <summary>
- /// Dispose AlertDialog and all children on it.
+ /// Creates a new instance of AlertDialog.
+ /// </summary>
+ /// <param name="style">Creates AlertDialog by special style defined in UX.</param>
+ /// <since_tizen> 9 </since_tizen>
+ public AlertDialog(string style) : base(style)
+ {
+ Initialize();
+ }
+
+ /// <summary>
+ /// Creates a new instance of AlertDialog.
- /// <param name="type">Dispose type.</param>
+ /// <param name="alertDialogStyle">Creates AlertDialog by style customized by user.</param>
+ /// <since_tizen> 9 </since_tizen>
+ public AlertDialog(AlertDialogStyle alertDialogStyle) : base(alertDialogStyle)
+ {
+ Initialize();
+ }
+
+ /// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
{
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
{
/// Applies style to AlertDialog.
/// </summary>
/// <param name="viewStyle">The style to apply.</param>
/// Applies style to AlertDialog.
/// </summary>
/// <param name="viewStyle">The style to apply.</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public override void ApplyStyle(ViewStyle viewStyle)
{
styleApplied = false;
public override void ApplyStyle(ViewStyle viewStyle)
{
styleApplied = false;
/// <summary>
/// Title text of AlertDialog.
/// <summary>
/// Title text of AlertDialog.
+ /// Title text is set to TitleContent's Text if TitleContent is TextLabel.
+ /// If TitleContent's Text is set manually by user, then it is not guaranteed that TitleContent's Text is the same with Title text.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public string Title
{
get
public string Title
{
get
- /// Title content of AlertDialog. TitleContent is added to Children automatically.
+ /// Title content of AlertDialog.
+ /// TitleContent is added as a child of AlertDialog automatically.
+ /// Title text is set to TitleContent's Text if TitleContent is TextLabel.
+ /// If TitleContent's Text is set manually by user, then it is not guaranteed that TitleContent's Text is the same with Title text.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public View TitleContent
{
get
public View TitleContent
{
get
/// <summary>
/// Message text of AlertDialog.
/// <summary>
/// Message text of AlertDialog.
+ /// Message text is set to Content's Text if Content is TextLabel.
+ /// If Content's Text is set manually by user, then it is not guaranteed that Content's Text is the same with Message text.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public string Message
{
get
public string Message
{
get
- /// Content of AlertDialog. Content is added to Children automatically.
+ /// Content of AlertDialog.
+ /// Content is added as a child of AlertDialog automatically.
+ /// Message text is set to Content's Text if Content is TextLabel.
+ /// If Content's Text is set manually by user, then it is not guaranteed that Content's Text is the same with Message text.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public View Content
{
get
public View Content
{
get
/// <summary>
/// Action views of AlertDialog.
/// <summary>
/// Action views of AlertDialog.
- /// Action views are added to ActionContent of AlertDialog.
+ /// Action views are added as children of ActionContent.
+ /// When Actions are set, previous Actions are removed from ActionContent.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public IEnumerable<View> Actions
{
get
public IEnumerable<View> Actions
{
get
- /// Action content of AlertDialog. ActionContent is added to Children automatically.
+ /// Action content of AlertDialog.
+ /// ActionContent is added as a child of AlertDialog automatically.
+ /// Actions are added as children of ActionContent.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public View ActionContent
{
get
public View ActionContent
{
get
namespace Tizen.NUI.Components
{
/// <summary>
namespace Tizen.NUI.Components
{
/// <summary>
- /// Dialog class shows a popup content with background scrim.
+ /// Dialog class shows a dialog with content.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class Dialog : Control
{
private View content = null;
public class Dialog : Control
{
private View content = null;
/// <summary>
/// Creates a new instance of Dialog.
/// </summary>
/// <summary>
/// Creates a new instance of Dialog.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Dialog() : base()
{
Layout = new AbsoluteLayout();
public Dialog() : base()
{
Layout = new AbsoluteLayout();
this.Relayout += OnRelayout;
}
this.Relayout += OnRelayout;
}
- /// <summary>
- /// Dispose Dialog and all children on it.
- /// </summary>
- /// <param name="type">Dispose type.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
{
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
{
- /// Popup content of Dialog. Content is added to Children automatically.
+ /// Popup content of Dialog.
+ /// Content is added as a child of Dialog automatically.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public View Content
{
get
public View Content
{
get
/// The DialogPage class is a class which shows a dialog on the page.
/// DialogPage contains dialog and dimmed scrim behind the dialog.
/// </summary>
/// The DialogPage class is a class which shows a dialog on the page.
/// DialogPage contains dialog and dimmed scrim behind the dialog.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class DialogPage : Page
{
private View content = null;
public class DialogPage : Page
{
private View content = null;
/// <summary>
/// Creates a new instance of a DialogPage.
/// </summary>
/// <summary>
/// Creates a new instance of a DialogPage.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public DialogPage() : base()
{
Layout = new AbsoluteLayout();
public DialogPage() : base()
{
Layout = new AbsoluteLayout();
- /// Content of DialogPage. Content is added to Children automatically.
+ /// Content of DialogPage.
+ /// Content is used as dialog, so Content is displayed above the dimmed scrim.
+ /// Content is added as a child of DialogPage automatically.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public View Content
{
get
public View Content
{
get
- content.RaiseAbove(Scrim);
+ foreach (var child in Children)
+ {
+ if (child != Scrim)
+ {
+ // All children are above Scrim not to be covered by Scrim.
+ child.RaiseAbove(Scrim);
+ }
+ }
- /// Scrim of DialogPage. Scrim is added to Children automatically.
+ /// Scrim of DialogPage.
+ /// Scrim is the dimmed screen region behind dialog.
+ /// Scrim is added as a child of DialogPage automatically.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
protected View Scrim
{
get
protected View Scrim
{
get
+ foreach (var child in Children)
- Content.RaiseAbove(scrim);
+ if (child != scrim)
+ {
+ // All children are above Scrim not to be covered by Scrim.
+ child.RaiseAbove(scrim);
+ }
}
if (EnableScrim != Scrim.Visibility)
}
if (EnableScrim != Scrim.Visibility)
/// <summary>
/// Indicates to show scrim behind dialog.
/// </summary>
/// <summary>
/// Indicates to show scrim behind dialog.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public bool EnableScrim
{
get
public bool EnableScrim
{
get
/// <summary>
/// Indicates to dismiss dialog by touching on scrim.
/// </summary>
/// <summary>
/// Indicates to dismiss dialog by touching on scrim.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public bool EnableDismissOnScrim { get; set; } = true;
/// <summary>
/// The color of scrim.
/// </summary>
public bool EnableDismissOnScrim { get; set; } = true;
/// <summary>
/// The color of scrim.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public Color ScrimColor
{
get
public Color ScrimColor
{
get
/// Shows a dialog by pushing a dialog page containing dialog to default navigator.
/// </summary>
/// <param name="content">The content of Dialog.</param>
/// Shows a dialog by pushing a dialog page containing dialog to default navigator.
/// </summary>
/// <param name="content">The content of Dialog.</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
[SuppressMessage("Microsoft.Reliability",
"CA2000:DisposeObjectsBeforeLosingScope",
Justification = "The pushed views are added to NavigationPages and are disposed in Navigator.Dispose().")]
[SuppressMessage("Microsoft.Reliability",
"CA2000:DisposeObjectsBeforeLosingScope",
Justification = "The pushed views are added to NavigationPages and are disposed in Navigator.Dispose().")]
/// <param name="title">The title of AlertDialog.</param>
/// <param name="message">The message of AlertDialog.</param>
/// <param name="actions">The action views of AlertDialog.</param>
/// <param name="title">The title of AlertDialog.</param>
/// <param name="message">The message of AlertDialog.</param>
/// <param name="actions">The action views of AlertDialog.</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
[SuppressMessage("Microsoft.Reliability",
"CA2000:DisposeObjectsBeforeLosingScope",
Justification = "The pushed views are added to NavigationPages and are disposed in Navigator.Dispose().")]
[SuppressMessage("Microsoft.Reliability",
"CA2000:DisposeObjectsBeforeLosingScope",
Justification = "The pushed views are added to NavigationPages and are disposed in Navigator.Dispose().")]
namespace Tizen.NUI.Components
{
/// <summary>
namespace Tizen.NUI.Components
{
/// <summary>
- /// AlertDialogStyle is a class which saves AlertDialog's ux data.
+ /// AlertDialogStyle is a class which saves AlertDialog's UX data.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public class AlertDialogStyle : ButtonStyle
{
[EditorBrowsable(EditorBrowsableState.Never)]
static AlertDialogStyle() { }
/// <summary>
public class AlertDialogStyle : ButtonStyle
{
[EditorBrowsable(EditorBrowsableState.Never)]
static AlertDialogStyle() { }
/// <summary>
- /// Creates a new instance of a AlertDialogStyle.
+ /// Creates a new instance of an AlertDialogStyle.
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public AlertDialogStyle() : base()
{
}
/// <summary>
public AlertDialogStyle() : base()
{
}
/// <summary>
- /// Creates a new instance of a AlertDialogStyle with style.
+ /// Creates a new instance of an AlertDialogStyle with style.
+ /// The given style is copied to the new instance.
/// </summary>
/// <param name="style">Create AlertDialogStyle by style customized by user.</param>
/// </summary>
/// <param name="style">Create AlertDialogStyle by style customized by user.</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public AlertDialogStyle(AlertDialogStyle style) : base(style)
{
}
public AlertDialogStyle(AlertDialogStyle style) : base(style)
{
}
/// Gets or sets the AlertDialog Title TextLabel style.
/// This style is applied if AlertDialog TitleContent is a TextLabel.
/// </summary>
/// Gets or sets the AlertDialog Title TextLabel style.
/// This style is applied if AlertDialog TitleContent is a TextLabel.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public TextLabelStyle TitleTextLabel { get; set; } = new TextLabelStyle();
/// <summary>
/// Gets or sets the AlertDialog Message TextLabel style.
/// This style is applied if AlertDialog Content is a TextLabel.
/// </summary>
public TextLabelStyle TitleTextLabel { get; set; } = new TextLabelStyle();
/// <summary>
/// Gets or sets the AlertDialog Message TextLabel style.
/// This style is applied if AlertDialog Content is a TextLabel.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public TextLabelStyle MessageTextLabel { get; set; } = new TextLabelStyle();
/// <summary>
/// Gets or sets the AlertDialog ActionContent style.
/// </summary>
public TextLabelStyle MessageTextLabel { get; set; } = new TextLabelStyle();
/// <summary>
/// Gets or sets the AlertDialog ActionContent style.
/// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <since_tizen> 9 </since_tizen>
public ViewStyle ActionContent { get; set; } = new ViewStyle();
public ViewStyle ActionContent { get; set; } = new ViewStyle();
- /// <summary>
- /// Style's clone function.
- /// </summary>
- /// <param name="bindableObject">The style that need to copy.</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
+ /// <inheritdoc/>
+ /// <since_tizen> 9 </since_tizen>
public override void CopyFrom(BindableObject bindableObject)
{
base.CopyFrom(bindableObject);
public override void CopyFrom(BindableObject bindableObject)
{
base.CopyFrom(bindableObject);