{
get
{
+ return GetValue(ActionsProperty) as IEnumerable<View>;
+ }
+ set
+ {
+ SetValue(ActionsProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private IEnumerable<View> InternalActions
+ {
+ get
+ {
return actionContentViews;
}
set
using System.ComponentModel;
+using System.Collections.Generic;
using Tizen.NUI.BaseComponents;
using Tizen.NUI.Binding;
});
/// <summary>
+ /// ActionsProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ActionsProperty = BindableProperty.Create(nameof(Actions), typeof(IEnumerable<View>), typeof(AlertDialog), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (AlertDialog)bindable;
+ if (newValue != null)
+ {
+ instance.InternalActions = newValue as IEnumerable<View>;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (AlertDialog)bindable;
+ return instance.InternalActions;
+ });
+
+ /// <summary>
/// ActionContentProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<DialogPage x:Class="NUITizenGallery.AlertDialogTestDialogPage"
+ xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:sys="clr-namespace:System.Collections.Generic;assembly=netstandard">
+
+ <!-- Content is main placeholder of DialogPage. Add your dialog into this view. -->
+ <DialogPage.Content>
+ <AlertDialog x:Name="alertDialog" Title="Title" Message="Message">
+ <AlertDialog.Actions>
+ <sys:List x:TypeArguments="View">
+ <Button x:Name="cancelButton" Text="Cancel"/>
+ <Button x:Name="okButton" Text="OK"/>
+ </sys:List>
+ </AlertDialog.Actions>
+ </AlertDialog>
+ </DialogPage.Content>
+
+</DialogPage>
--- /dev/null
+/*
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+//using Tizen.NUI;
+//using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUITizenGallery
+{
+ public partial class AlertDialogTestDialogPage : DialogPage
+ {
+ public AlertDialogTestDialogPage()
+ {
+ InitializeComponent();
+
+ cancelButton.Clicked += CancelButtonClicked;
+ okButton.Clicked += OkButtonClicked;
+ }
+
+ private void CancelButtonClicked(object sender, ClickedEventArgs args)
+ {
+ Navigator?.Pop();
+ }
+
+ private void OkButtonClicked(object sender, ClickedEventArgs args)
+ {
+ Navigator?.Pop();
+ }
+ }
+}
<LinearLayout LinearOrientation="Vertical" CellPadding="0,20"/>
</View.Layout>
+ <Button x:Name="buttonWithXaml"
+ Text="Show AlertDialog with xaml"
+ WidthSpecification="{Static LayoutParamPolicies.MatchParent}" />
+
<Button x:Name="buttonOneAction"
Text="Show AlertDialog with one button"
WidthSpecification="{Static LayoutParamPolicies.MatchParent}" />
/*
- * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
InitializeComponent();
+ buttonWithXaml.Clicked += ButtonWithXamlClicked;
buttonOneAction.Clicked += ButtonOneActionClicked;
buttonTwoActions.Clicked += ButtonTwoActionsClicked;
buttonNoTitle.Clicked += ButtonNoTitleClicked;
private int count;
+ private void ButtonWithXamlClicked(object sender, ClickedEventArgs args)
+ {
+ NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(new AlertDialogTestDialogPage());
+ }
+
private void ButtonOneActionClicked(object sender, ClickedEventArgs args)
{
var button = new Button()